================
@@ -10757,6 +10757,17 @@ static void checkMethodTypeQualifiers(Sema &S,
Declarator &D, unsigned DiagID) {
}
}
+static void checkMethodPointerType(Sema &S, Declarator &D, unsigned DiagID) {
+ if (D.getNumTypeObjects() > 0) {
+ DeclaratorChunk &Chunk = D.getTypeObject(D.getNumTypeObjects() - 1);
+ if (Chunk.Kind == DeclaratorChunk::Pointer) {
+ SourceLocation PointerLoc = Chunk.getSourceRange().getBegin();
+ S.Diag(PointerLoc, DiagID) << Chunk.getSourceRange();
+ D.setInvalidType();
+ }
+ }
+}
+
----------------
cor3ntin wrote:
You are right, parentheses are valid. Good catch. But everything else is not
https://eel.is/c++draft/class.ctor#general-1
So if any of the chuck is not either `Function` or `Paren` it should be an error
https://github.com/llvm/llvm-project/pull/122621
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits