Anastasia added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:12449
   // function declaration is going to be treated as an error.
-  if (Diags.getDiagnosticLevel(diag_id, Loc) >= DiagnosticsEngine::Error) {
+  if (!getLangOpts().OpenCL &&
+      Diags.getDiagnosticLevel(diag_id, Loc) >= DiagnosticsEngine::Error) {
----------------
This way prevents the typo corrections completely for OpenCL which is not very 
desirable. I was just wondering could we prevent adding the invalid builtin 
function identifiers instead to the correction candidate list.

Like when `work_group_reserve_read_pipe` was first parsed it shouldn't have 
been added to the list of valid function identifiers to appear in the 
corrections of  'work_group_reserve_write_pipe'. I am guessing the identifier 
might be added when builtins are initialized...


https://reviews.llvm.org/D31745



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to