summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/predefined-expr-cxx14.cpp
AgeCommit message (Collapse)Author
2019-01-22[CodeGen] Always use string computed in Sema for PredefinedExprEli Friedman
We can't use any other string, anyway, because its type wouldn't match the type of the PredefinedExpr. With this change, we don't compute a "nice" name for the __func__ global when it's used in the initializer for a constant. This doesn't seem like a great loss, and I'm not sure how to fix it without either storing more information in the AST, or somehow threading through the information from ExprConstant.cpp. This could break some situations involving BlockDecl; currently, CodeGenFunction::EmitPredefinedLValue has some logic to intentionally emit a string different from what Sema computed. This code skips that logic... but that logic can't work correctly in general anyway. (For example, sizeof(__func__) returns the wrong result.) Hopefully this doesn't affect practical code. Fixes https://bugs.llvm.org/show_bug.cgi?id=40313 . Differential Revision: https://reviews.llvm.org/D56821 llvm-svn: 351766
2016-11-16Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini
Objective-C Blocks Instead of always displaying the mangled name, try to do better and get something closer to regular functions. Recommit r287039 (that was reverted in r287039) with a tweak to be more generic, and test fixes! Differential Revision: https://reviews.llvm.org/D26522 llvm-svn: 287085
2016-11-15Revert "Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini
Objective-C Blocks" This reverts commit r287039, tests are broken. llvm-svn: 287043
2016-11-15Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini
Objective-C Blocks Instead of always displaying the mangled name, try to do better and get something closer to regular functions. Differential Revision: https://reviews.llvm.org/D26522 llvm-svn: 287039
2014-11-14This patch fixes couple of bugs for predefined expressionFariborz Jahanian
used inside blocks. It fixes a crash in naming code for __func__ etc. when used in a block declared globally. It also brings back old naming convention for predefined expression which was broken. rdar://18961148 llvm-svn: 222065
2014-10-13PredefinedExpr deserialization test in dependent context.Alexey Bataev
For commit r219561 - Fix deserialization of PredefinedExpr in dependent context. llvm-svn: 219594
2014-10-10Bugfix for predefined expressions in dependent context.Alexey Bataev
This bug break compilation with precompiled headers and predefined expressions in dependent context. llvm-svn: 219525
2014-10-09Fix for bug http://llvm.org/PR17427.Alexey Bataev
Assertion failed: "Computed __func__ length differs from type!" Reworked PredefinedExpr representation with internal StringLiteral field for function declaration. Differential Revision: http://reviews.llvm.org/D5365 llvm-svn: 219393