Repository navigation
Name every unsupported construct in C++ terms; lower C++20 rewritten comparisons - #134
Merged
Merged
Conversation
…C++ has no name for.
…s, and a quoted construct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan item E2 (located messages in user terms) and exit criterion 2: "no message names a Clang AST class". The converter named every construct it had no words for by Clang's class (
this statement is unsupported (OMPSimdDirective)), and its test said so: "A construct without a name of its own is named by Clang's class".On the base
With this PR
and
rewrittenverifies.Change
unsupportedConstructnames, as C++ does, OpenMP directives (anyOMPExecutableDirective), coroutines (co_return,co_await,co_yield, a coroutine body),__try, atomic operations (__atomic_*,AtomicExpr),typeid,dynamic_cast,va_arg,__uuidof, vector and matrix operations, and a pseudo-destructor call (y.Int::~Int(), which was called an indirect call).quotedSource, through the expansion range, so a macro shows its use). No message of the converter names a Clang class now;getStmtClassNamehas no other use inclang/lib/Verify.a != bwith onlyoperator==, which is!(a == b);5 == rwith onlyR::operator==(int), reversed tor == 5) is converted as its semantic form, the call Clang already built, and checked against that operator's contract. Nothing else about member operators changes: the object must be a reference, an addressable local, or a dereference, as fora == b.Tests
unsupported_constructs.cpp: the OpenMP check now expects its name; new cases for an atomic load, a coroutine, a pseudo-destructor call, andx ?: 1quoted.suite/rewritten_comparisons.cpp(new):a != band reversed5 == rand5 != rverify; the same with the meaning of==claimed for!=fails with a counterexample; rewritten comparisons in a condition and an operand verify.rewritten_comparisons.cpp), the class name back in the fallback (unsupported_constructs.cpp).check-doc-examples.py.Docs