[PATCH] D36044: [OpenCL] -cl-ext option can overwrite OpenCL features imported from a module

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 10:01:09 PDT 2017


Anastasia added inline comments.


================
Comment at: include/clang/Basic/OpenCLOptions.h:132
 
-  void disableAll() {
+  void enableAll(bool On = true) {
     for (llvm::StringMap<Info>::iterator I = OptMap.begin(),
----------------
May be the name could be `setAll` since it's doing both enable and disable too.


================
Comment at: test/SemaOpenCL/extensions-import.cl:6
+// No PCH
+// RUN: %clang_cc1 -x cl -O0 -cl-std=CL1.2 %s -fsyntax-only -verify -DFP64
+// RUN: %clang_cc1 -x cl -O0 -cl-std=CL1.2 %s -fsyntax-only -verify -cl-ext=-cl_khr_fp64
----------------
Do we need to test w/o PCH here? I think we have similar test coverage in `test/SemaOpenCL/extensions.cl`.

Also we normally put RUN lines first.


https://reviews.llvm.org/D36044





More information about the cfe-commits mailing list