[PATCH] D70973: [OPENMP50]Treat context selectors as expressions, not just strings.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 06:53:18 PST 2019


ABataev marked 2 inline comments as done.
ABataev added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1230
-  "unknown '%0' device kind trait in the 'device' context selector set, expected"
-  " one of 'host', 'nohost', 'cpu', 'gpu' or 'fpga'">;
 
----------------
jdoerfert wrote:
> I would have expected this error to be still accurate, maybe with the addition ", or quoted versions thereof".
Currently, we could emit it only in codegen phase to avoid double converting from expression to string. Will emit it there.


================
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:424
+        if (ER.isUsable())
+          Values.push_back(ER);
       }
----------------
jdoerfert wrote:
> When would ER not be usable here? Is there a valid use case or should we assert it is?
If the instantiation is failed, the error message is emitted and `ER` is set to `ExprError`, which is not usable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70973/new/

https://reviews.llvm.org/D70973





More information about the cfe-commits mailing list