summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/predefined-expr-cxx14.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Always use string computed in Sema for PredefinedExprEli Friedman2019-01-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini2016-11-161-2/+2
| | | | | | | | | | | | | | 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
* Revert "Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini2016-11-151-2/+2
| | | | | | | | Objective-C Blocks" This reverts commit r287039, tests are broken. llvm-svn: 287043
* Improve handling of __FUNCTION__ and other predefined expression for ↵Mehdi Amini2016-11-151-2/+2
| | | | | | | | | | | 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
* This patch fixes couple of bugs for predefined expressionFariborz Jahanian2014-11-141-2/+2
| | | | | | | | | 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
* PredefinedExpr deserialization test in dependent context.Alexey Bataev2014-10-131-1/+16
| | | | | | For commit r219561 - Fix deserialization of PredefinedExpr in dependent context. llvm-svn: 219594
* Bugfix for predefined expressions in dependent context.Alexey Bataev2014-10-101-0/+7
| | | | | | This bug break compilation with precompiled headers and predefined expressions in dependent context. llvm-svn: 219525
* Fix for bug http://llvm.org/PR17427.Alexey Bataev2014-10-091-0/+83
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
OpenPOWER on IntegriCloud