hans added a reviewer: mstorsjo.
hans added a comment.

+mstorsjo is this okay for mingw mode too?



================
Comment at: clang/lib/Sema/SemaExpr.cpp:3558
+    return PredefinedExpr::Create(Context, Loc, ResTy, IK, SL);
+  } else {
     // Pre-defined identifiers are of type char[x], where x is the length of
----------------
Since this becomes an "else after return" it could be dropped.


================
Comment at: clang/test/CodeGen/predefined-expr.c:4
+
+// ITANIUM: @__func__.plainFunction = private unnamed_addr constant [14 x i8] 
c"plainFunction\00"
+// ITANIUM: @__PRETTY_FUNCTION__.plainFunction = private unnamed_addr constant 
[25 x i8] c"void plainFunction(void)\00"
----------------
Both invocations use the Itanium abi, so the check prefix is a bit confusing. 
How about DEFAULT and MS?


================
Comment at: clang/test/Sema/ms_predefined_expr.cpp:4
+
+void f(void) {
+ const char a[] = __FUNCTION__;
----------------
ultra nit: the 'void' param makes this look like c code. Should it go in a .c 
file instead of .cpp?


================
Comment at: clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp:1062
+  // Predefined expressions are string literals under Microsoft extensions.
+  if (GetParam().isWin32())
+    return;
----------------
Could the same check be used in ASTImporterTest.cpp?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146764

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATC... Arthur Eubanks via Phabricator via cfe-commits
    • ... Hans Wennborg via Phabricator via cfe-commits
    • ... Aaron Ballman via Phabricator via cfe-commits
    • ... Martin Storsj√∂ via Phabricator via cfe-commits
    • ... Arthur Eubanks via Phabricator via cfe-commits
    • ... Aaron Ballman via Phabricator via cfe-commits
    • ... Corentin Jabot via Phabricator via cfe-commits
    • ... Arthur Eubanks (out until mid-April) via Phabricator via cfe-commits
    • ... Richard Smith - zygoloid via Phabricator via cfe-commits
    • ... Aaron Ballman via Phabricator via cfe-commits

Reply via email to