[PATCH] D45835: Add new driver mode for dumping compiler options

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 28 04:51:28 PDT 2018


aaron.ballman marked 3 inline comments as done.
aaron.ballman added inline comments.


================
Comment at: test/Frontend/compiler-options-dump.cpp:3
+// RUN: %clang_cc1 -compiler-options-dump -std=c++17 %s -o - | FileCheck %s --check-prefix=CXX17
+// RUN: %clang_cc1 -compiler-options-dump -std=c99 -ffast-math -x c %s -o - | FileCheck %s --check-prefix=C99
+
----------------
hfinkel wrote:
> You don't need -ffast-math here I presume.
Correct, I'll drop from the commit (or in the next patch).


================
Comment at: test/Frontend/compiler-options-dump.cpp:15
+// CXX17: "extensions"
+// CXX17: "cxx_range_for" : true
+
----------------
hfinkel wrote:
> cxx_range_for is both a feature and an extension?
Correct. The way we implement __has_feature is to return true only if the -std line supports the feature, and __has_extension will return true if __has_feature returns true or if the extension is enabled.


https://reviews.llvm.org/D45835





More information about the cfe-commits mailing list