Skip to content

Commit

Permalink
Synchronise file extensions between C++ language and C/C++ preprocessor
Browse files Browse the repository at this point in the history
Largely follows GCC's documentation at
https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#index-file-name-suffix-71,
with the extension that we accept some uppercase variants in C/C++
pre-processing.

Fixes: diffblue#4358
  • Loading branch information
tautschnig committed Mar 11, 2019
1 parent 31a06e8 commit 0037ec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ansi-c/c_preprocess.cpp
Expand Up @@ -585,7 +585,8 @@ bool c_preprocess_gcc_clang(
has_suffix(file, ".C") ||
#endif
has_suffix(file, ".c++") || has_suffix(file, ".C++") ||
has_suffix(file, ".cp") || has_suffix(file, ".CP"))
has_suffix(file, ".cp") || has_suffix(file, ".CP") ||
has_suffix(file, ".cc") || has_suffix(file, ".cxx"))
{
switch(config.cpp.cpp_standard)
{
Expand Down
1 change: 1 addition & 0 deletions src/cpp/cpp_language.cpp
Expand Up @@ -37,6 +37,7 @@ std::set<std::string> cpp_languaget::extensions() const
s.insert("cpp");
s.insert("CPP");
s.insert("cc");
s.insert("cp");
s.insert("c++");
s.insert("ii");
s.insert("cxx");
Expand Down

0 comments on commit 0037ec5

Please sign in to comment.