mibintc marked an inline comment as done.
mibintc added inline comments.

================
Comment at: clang/lib/Parse/ParsePragma.cpp:2537
+    if (!Actions.CurContext->isTranslationUnit()) {
+//FIXME this seems to be the wrong way to check file-scope
+//since the token immediately following a function definition
----------------
sepavloff wrote:
> Probably using `Actions.getCurScope()` can help to recognize file scope.
Thanks for the suggestion, I (Actions.getCurScope()==0) to test for file scope, 
but that didn't work either. I put a workaround into the test case 
CodeGen/fp-floatcontrol-pragma.cpp, the forward class declaration ResetTUScope. 
If the reset is there, then the pragma is recognized to be at file scope. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72841



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

Reply via email to