aaron.ballman added inline comments.

================
Comment at: clang/test/Preprocessor/pragma_microsoft.c:210
+#pragma function(main)                   // expected-warning {{'main' is not a 
recognized builtin; consider including <intrin.h>}}
+#pragma function(                        // expected-warning {{missing ')' 
after}}
+#pragma function(int)                    // expected-warning {{missing ')' 
after}}
----------------
steplong wrote:
> Hmm does it make sense for this to be a warning and not an error?
I'm glad I'm not the only one who questioned this. :-D I tend to be of the 
opinion that syntax errors should be errors rather than warnings. However, this 
is using an existing warning that's used by a bunch of other pragmas so I think 
it's defensible to use it here, especially given that this pragma form is 
commonly used for compiler extensions (so who knows, the syntax could be valid 
for another compiler, I guess).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124702/new/

https://reviews.llvm.org/D124702

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to