diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:39:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:39:25 +0000 |
commit | 5882771102ae4432014a95ef467f30cb030a1e3f (patch) | |
tree | b449e20ec364d5a0b60562dfd4505a05ddf2e659 /clang/test/Lexer | |
parent | dde6eb34bb5d6193bf186ba21e280fe702f75bb2 (diff) | |
download | bcm5719-llvm-5882771102ae4432014a95ef467f30cb030a1e3f.tar.gz bcm5719-llvm-5882771102ae4432014a95ef467f30cb030a1e3f.zip |
Fix PR2477 - clang misparses "//*" in C89 mode
llvm-svn: 62368
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r-- | clang/test/Lexer/c90.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Lexer/c90.c b/clang/test/Lexer/c90.c index 4bbddaf38b4..d76c73ddc3d 100644 --- a/clang/test/Lexer/c90.c +++ b/clang/test/Lexer/c90.c @@ -4,3 +4,10 @@ enum { cast_hex = (long) ( 0x0p-1 /* expected-error {{hexadecimal floating constants are a C99 feature}} */ ) }; + +/* PR2477 */ +int test1(int a,int b) {return a//* This is a divide followed by block comment in c89 mode */ +b;} + +// comment accepted as extension /* expected-error {{// comments are not allowed in this language}} + |