llvm-project/clang/lib
Sylvestre Ledru 6ae3980118 Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2152

llvm-svn: 194817
2013-11-15 15:39:14 +00:00
..
ARCMigrate ObjectiveC migrator: This patch sets access property 2013-11-14 18:28:58 +00:00
AST Modern gcc is happy to constant evaluate __builtin_strlen in various cases 2013-11-15 02:10:04 +00:00
ASTMatchers Introduce MatchFinder::matchAST. 2013-11-07 22:30:36 +00:00
Analysis Thread-safety analysis: check guarded_by and pt_guarded_by on array access. 2013-11-08 19:42:01 +00:00
Basic R600: Add processor type for Hawaii 2013-11-14 23:45:53 +00:00
CodeGen Fix test failures after addrspacecast added. 2013-11-15 02:19:52 +00:00
Driver Using an invalid -O falls back on -O3 instead of an error 2013-11-15 15:39:14 +00:00
Edit ObjectiveC migrator: When doing migration, migrator must suggest 2013-10-01 21:16:29 +00:00
Format Correctly mark first token in the presence of UTF-8 BOM. 2013-11-13 14:04:17 +00:00
Frontend Using an invalid -O falls back on -O3 instead of an error 2013-11-15 15:39:14 +00:00
FrontendTool [objcmt] If the frontend option is frontend::MigrateSource then we don't need to create 2013-11-13 23:38:17 +00:00
Headers Define [U]LLONG_{MIN,MAX} for C++11, add tests. 2013-10-27 19:00:49 +00:00
Index libclang does not depend directly on clangFormat; but clangIndex does 2013-11-13 22:26:04 +00:00
Lex When we hit a #include directive that maps to a module import, emit a token 2013-11-15 04:24:58 +00:00
Parse When we hit a #include directive that maps to a module import, emit a token 2013-11-15 04:24:58 +00:00
Rewrite Fix typo: inccrementally 2013-10-13 12:02:16 +00:00
Sema When we hit a #include directive that maps to a module import, emit a token 2013-11-15 04:24:58 +00:00
Serialization Include non-explicit submodules in exported module list 2013-11-04 21:51:33 +00:00
StaticAnalyzer [analyzer] Silence warnings coming from allocators used by std::basic_string. 2013-11-15 02:11:19 +00:00
Tooling Adds the ability to inject a DiagnosticConsumer into ClangTools. 2013-11-07 23:18:05 +00:00
CMakeLists.txt Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00
Makefile Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00