aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2014-06-19 18:30:15 +0000
committerEli Bendersky <eliben@google.com>2014-06-19 18:30:15 +0000
commitf637790102ea414da2c43fb1c5f6d2aab9d354c7 (patch)
treea84bb08d3c9e98265e3b37bfa209f5ed265649c4 /clang/lib/Frontend/CompilerInvocation.cpp
parentdf4d5efc7c70b902d2b2083fcdbc37f44ef81c4e (diff)
downloadllvm-f637790102ea414da2c43fb1c5f6d2aab9d354c7.zip
llvm-f637790102ea414da2c43fb1c5f6d2aab9d354c7.tar.gz
llvm-f637790102ea414da2c43fb1c5f6d2aab9d354c7.tar.bz2
Fix PR20069: bad loop pragma arguments crash FE
This patch fixes a crash when handling malformed arguments to loop pragmas such as: "#pragma clang loop vectorize(()". Essentially any argument which is not an identifier or constant resulted in a crash. This patch also changes a couple of the error messages which weren't quite correct. New behavior with this patch vs old behavior: #pragma clang loop vectorize(1) OLD: error: missing keyword; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' #pragma clang loop vectorize() OLD: error: expected ')' NEW: error: missing argument to loop pragma 'vectorize' #pragma clang loop vectorize_width(bad) OLD: error: missing value; expected a positive integer value NEW: error: invalid argument; expected a positive integer value #pragma clang loop vectorize(bad) OLD: invalid keyword 'bad'; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' http://reviews.llvm.org/D4197 Patch by Mark Heffernan llvm-svn: 211292
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions