plasma-umass / cwhy

"See why!" Explains and suggests fixes for compile-time errors for C, C++, C#, Go, Java, LaTeX, PHP, Python, Ruby, Rust, and TypeScript
Apache License 2.0
273 stars 6 forks source link

Regexes seem to be broken again with Clang #25

Closed nicovank closed 11 months ago

nicovank commented 1 year ago

Testing with missing-hash, it's matching again the "In file included part". I will look into it soon.

% `cwhy --wrapper --wrapper-compiler=clang++ diff` ./tests/c++/missing-hash.cpp
Cwhy warning: file not found: In file included from ./tests/c++/missing-hash.cpp
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/unordered_map
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable.h
Cwhy warning: file not found: In file included from ./tests/c++/missing-hash.cpp
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/unordered_map
Cwhy warning: file not found: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable.h
emeryberger commented 1 year ago

Probably would be good to get some CI tests in here to make sure we don't get any regressions on any languages.

nicovank commented 11 months ago

Reproduction.

% docker run -it ubuntu

% apt update
% apt install -y curl git python3 python3-pip
% apt install -y lsb-release wget software-properties-common gnupg
% curl -sSf https://apt.llvm.org/llvm.sh | bash -s -- 17 all
% git clone https://github.com/plasma-umass/cwhy.git
% cd cwhy
% python3 -m pip install --upgrade pip
% python3 -m pip install .
% `cwhy --wrapper --wrapper-compiler=clang++-17 --show-prompt diff` ./tests/c++/missing-hash.cpp | grep warning
nicovank commented 11 months ago

Java is the problematic regular expression.