Force the unittests on c++ code for matchers to specify the correct standard.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
420 ms | libomp.ompt/tasks::Unknown Unit Message ("") |
Event Timeline
This is an interesting question. Since Clang accepts certain constructs in older C++ standard versions as extensions, shouldn't we test AST matchers in those modes as well? I think it could be argued either way.
Approving since I think that it is probably too costly for tooling to try to handle such language extensions. We also don't have a principled way to know what "future" C++ feature is supported in a given language mode, so I think we would always have implementation and testing gaps because people implementing tooling won't know what features to even expect in ASTs.
Clang accepts a lot of stuff for better or worse, my fist try at this was using -pedantic-errors, but that was throwing errors with gnu and microsoft extensions which would be a much more invasive fix to sort out.