================
@@ -3605,8 +3605,11 @@ static QualType 
GetDeclSpecTypeForDeclarator(TypeProcessingState &state,
         Info = &SemaRef.InventedParameterInfos.back();
       } else {
         // In C++14, generic lambdas allow 'auto' in their parameters.
-        if (!SemaRef.getLangOpts().CPlusPlus14 || !Auto ||
-            Auto->getKeyword() != AutoTypeKeyword::Auto) {
+        if (!SemaRef.getLangOpts().CPlusPlus14 && Auto &&
+            Auto->getKeyword() == AutoTypeKeyword::Auto) {
+          Error = 24;
----------------
shafik wrote:

A lot of the other cases have comments explaining what diagnostic the code 
pertains to. See 20 or 7 below for example. 

This is not really great but at least we have a guide to which diagnostic we 
intend to emit.

https://github.com/llvm/llvm-project/pull/68540
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to