I really dislike the copy-pasting of the category strings. If there is a better
way to do this with TableGen, please advise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181494 91177308-0d34-0410-b5e6-96231b3b80d8
clang would omit 'C' for 'copy' properties and '&' for 'retain' properties if
the property was also 'readonly'. Fix this, which makes clang match gcc4.2's
behavior.
Fixes PR15928.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181491 91177308-0d34-0410-b5e6-96231b3b80d8
This made sense in pre-module era, before merging of HeaderFileInfos was introduced.
Final part of rdar://13840148.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181490 91177308-0d34-0410-b5e6-96231b3b80d8
After r180934 we may initiate module map parsing for modules not related to the module what we are building,
make sure we ignore the header file info of headers from such modules.
First part of rdar://13840148
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181489 91177308-0d34-0410-b5e6-96231b3b80d8
documentation commands. Patch was reviewed, along with
great suggestions for improvement, by Doug.
// rdar://12381408
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181458 91177308-0d34-0410-b5e6-96231b3b80d8
With style where the *s go with the type:
Before: typedef bool* (Class:: *Member)() const;
After: typedef bool* (Class::*Member)() const;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181439 91177308-0d34-0410-b5e6-96231b3b80d8
If the LHS of a binary expression is broken, clang-format should also
break after the operator as otherwise:
- The RHS can be easy to miss
- It can look as if clang-format doesn't understand operator precedence
Before:
bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa !=
bbbbbbbbbbbbbbbbbb && ccccccccc == ddddddddddd;
After:
bool aaaaaaaaaaaaaaaaaaaaa =
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa != bbbbbbbbbbbbbbbbbb &&
ccccccccc == ddddddddddd;
As an additional note, clang-format would also be ok with the following
formatting, it just has a higher penalty (IMO correctly so).
bool aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa !=
bbbbbbbbbbbbbbbbbb &&
ccccccccc == ddddddddddd;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181430 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding a Decl AST node
for this, but it seemed too heavyweight.
Mach-O already uses a metadata flag called "Linker Options" to do this
kind of auto-linking. This change follows that pattern.
LLVM knows how to forward the "Linker Options" metadata into the COFF
.drectve section where these flags belong. ELF support is not
implemented, but possible.
This is related to auto-linking, which is http://llvm.org/PR13016.
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D723
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
Before:
aaaaaaaa::
aaaaaaaa::
aaaaaaaa();
After:
aaaaaaaa::
aaaaaaaa::
aaaaaaaa();
The reason for the change is that:
a) we are not sure which is better
b) it is a really rare edge case
c) it simplifies the code
d) it currently causes problems with memoization
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181421 91177308-0d34-0410-b5e6-96231b3b80d8
Basic support is implemented here - it still doesn't account for
declared-but-not-defined variables or functions. It cannot handle out of
order (declared, 'using', then defined) cases for variables, but can
handle that for functions (& can handle declared, 'using'd, and not
defined at all cases for types).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181393 91177308-0d34-0410-b5e6-96231b3b80d8
return all the overloads instead of just picking the first possible declaration.
This removes an invalid note (and on occasion other invalid diagnostics) and
also makes clang's parsing recovery behave as if the text from its fixit were
applied.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181370 91177308-0d34-0410-b5e6-96231b3b80d8
This is a fix for PR15895, where Clang will crash when trying to print a
template diff and the template uses an address of operator. This resulted
from expecting a DeclRefExpr when the Expr could have also been
UnaryOperator->DeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181365 91177308-0d34-0410-b5e6-96231b3b80d8
Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from
the C++ features study group), and update documentation to match.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181342 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Added parseConfiguration method, which reads FormatStyle from YAML
string. This supports all FormatStyle fields and an additional BasedOnStyle
field, which can be used to specify base style.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D754
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181326 91177308-0d34-0410-b5e6-96231b3b80d8