summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-29 01:09:54 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-29 01:09:54 +0000
commit49039d4afb3f55c98d94467f86f7936f2e427d34 (patch)
treefc6cf4cf0bc294bfed6de355e88617b6fdd5ed16 /clang/lib
parent89e925d78e27a9c4b5faee55e49271ba11f624b3 (diff)
downloadbcm5719-llvm-49039d4afb3f55c98d94467f86f7936f2e427d34.tar.gz
bcm5719-llvm-49039d4afb3f55c98d94467f86f7936f2e427d34.zip
Complain if a __pragma isn't terminated.
llvm-svn: 112392
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/Pragma.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index af676670d1f..de713ebae60 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -202,6 +202,11 @@ void Preprocessor::HandleMicrosoft__pragma(Token &Tok) {
Lex(Tok);
}
+ if (Tok.is(tok::eof)) {
+ Diag(PragmaLoc, diag::err_unterminated___pragma);
+ return;
+ }
+
// Build the pragma string.
std::string StrVal = " ";
for (llvm::SmallVector<Token, 32>::iterator I =
OpenPOWER on IntegriCloud