diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 07:53:20 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 07:53:20 +0000 |
commit | d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75 (patch) | |
tree | b98ff481e74d50e22fe851ce2b597b5fdb5895e3 /clang/test/Preprocessor/annotate_in_macro_arg.c | |
parent | aaf2b84f99bdf5532dc4f0d1121fe96518c904ea (diff) | |
download | bcm5719-llvm-d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75.tar.gz bcm5719-llvm-d8dee1f54bfa6cc71806e2f960cd7a1fe4768a75.zip |
Lex: Don't call getIdentifierInfo on annotation tokens
These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot. This would cause the included test to
crash clang.
llvm-svn: 232616
Diffstat (limited to 'clang/test/Preprocessor/annotate_in_macro_arg.c')
-rw-r--r-- | clang/test/Preprocessor/annotate_in_macro_arg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/annotate_in_macro_arg.c b/clang/test/Preprocessor/annotate_in_macro_arg.c new file mode 100644 index 00000000000..f4aa7d15826 --- /dev/null +++ b/clang/test/Preprocessor/annotate_in_macro_arg.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -verify %s +#define M1() // expected-note{{macro 'M1' defined here}} + +M1( // expected-error{{unterminated function-like macro invocation}} + +#if M1() // expected-error{{expected value in expression}} +#endif +#pragma pack() |