| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Clang/LLVM this seems to be the more common formatting for ##s. There
might still be case that we miss, but we'll fix those as we go along.
Before:
#define A(X)
void function ## X();
After:
#define A(X)
void function##X();
llvm-svn: 171862
|
| |
|
|
|
|
| |
Fixes pr14835.
llvm-svn: 171857
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is a first step towards supporting more complex structures such
as #ifs inside unwrapped lines. This patch mostly converts the array-based
UnwrappedLine into a linked-list-based UnwrappedLine. Future changes will
allow multiple children for each Token turning the UnwrappedLine into a
tree.
No functional changes intended.
llvm-svn: 171856
|
| |
|
|
|
|
|
| |
The availability implies default visibility, so it can change the computed
visibility.
llvm-svn: 171840
|
| |
|
|
|
|
| |
Fixes <rdar://problem/12322000>.
llvm-svn: 171831
|
| |
|
|
|
|
|
|
|
| |
statements,
that the case does not "contain" a declaration that is referenced "outside" of it,
otherwise we will emit un-compilable code.
llvm-svn: 171828
|
| |
|
|
|
|
|
| |
bits from the number of parameters. This brings the bitfields down from 33 bits
to 32 bits, reducing the size of Types by 4 bytes on 32-bit systems.
llvm-svn: 171827
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue here is that if we have 2 leaks reported at the same line for
which we cannot print the corresponding region info, they will get
treated as the same by issue_hash+description. We need to AUGMENT the
issue_hash with the allocation info to differentiate the two issues.
Add the "hash" (offset from the beginning of a function) representing
allocation site to solve the issue.
We might want to generalize solution in the future when we decide to
track more than just the 2 locations from the diagnostics.
llvm-svn: 171825
|
| |
|
|
|
|
| |
This gives more flexibility to what could be stored as issue_hash.
llvm-svn: 171824
|
| |
|
|
|
|
|
| |
perform the semantic checks associated with the destruction of that temporary.
It'll be destroyed at the end of the constructor.
llvm-svn: 171818
|
| |
|
|
| |
llvm-svn: 171817
|
| |
|
|
|
|
|
|
|
|
| |
This is in preparation for using this to construct the function type for
pointers to member functions to include the implicit/artificial 'this'
parameter in that case as well. (feedback from GDB indicates that this might be
all that's necessary to get it to behave well with Clang's pointer-to-member
function debug output)
llvm-svn: 171809
|
| |
|
|
| |
llvm-svn: 171801
|
| |
|
|
|
|
| |
No (intended) functional change.
llvm-svn: 171800
|
| |
|
|
|
|
| |
related to // rdar://12958878
llvm-svn: 171792
|
| |
|
|
|
|
| |
can create a VLA of class type. Fixes <rdar://problem/12151822>.
llvm-svn: 171783
|
| |
|
|
| |
llvm-svn: 171782
|
| |
|
|
|
|
| |
Patch by Nick Lewycky. Fixes pr8703.
llvm-svn: 171781
|
| |
|
|
|
|
|
| |
list of classes, etc., make sure to look into protocol
definitions. // rdar://12958878
llvm-svn: 171777
|
| |
|
|
| |
llvm-svn: 171772
|
| |
|
|
|
|
|
|
| |
Lexer::getRawToken().
No functionality change.
llvm-svn: 171771
|
| |
|
|
|
|
|
|
|
| |
Better handle the blacklisting of known bad deallocators when symbol
escapes through a call to CFStringCreateWithBytesNoCopy.
Addresses radar://12702952.
llvm-svn: 171770
|
| |
|
|
|
|
|
|
|
| |
When a property is "inherited" through both a parent class and directly
through a protocol, we should not require the child to invalidate it
since the backing ivar belongs to the parent class.
(Fixes radar://12913734)
llvm-svn: 171769
|
| |
|
|
|
|
| |
@package is an Objective-C 2 feature, so turn on ObjC2 as well.
llvm-svn: 171766
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous indent:
class A {
}
a;
void f() {
};
With this patch:
class A {
} a;
void f() {
}
;
The patch introduces a production for classes and structs, and parses
the rest of the line to the semicolon after the class scope.
This allowed us to remove a long-standing wart in the parser that would
just much the semicolon after any block.
Due to this suboptimal formating some tests were broken.
Some unrelated formatting tests broke; those hit a bug in the ast
printing, and need to be fixed separately.
llvm-svn: 171761
|
| |
|
|
|
|
|
|
| |
http://llvm-reviews.chandlerc.com/D234
Patch by Philip Craig!
llvm-svn: 171760
|
| |
|
|
|
|
|
|
|
|
| |
Following r168626, in class declaration or definition, there are a combination of syntactic locations
where C++11 attributes could appear, and among those the only valid location permitted by standard is
between class-key and class-name. So for those attributes appear at wrong locations, fixit is used to
move them to expected location and we recover by applying them to the class specifier.
llvm-svn: 171757
|
| |
|
|
|
|
|
|
| |
rehashed, invaliding the iterator walking through the identifier
table. Separate out the identification of out-of-date identifiers from
updating them.
llvm-svn: 171756
|
| |
|
|
|
|
|
|
|
|
| |
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.
llvm-svn: 171755
|
| |
|
|
|
|
|
|
|
|
| |
Before:
throw a *b;
Now:
throw a * b;
llvm-svn: 171754
|
| |
|
|
| |
llvm-svn: 171753
|
| |
|
|
|
|
|
|
| |
This should make it slightly more readable as it more clearly separates
what happens where. No intended functional changes. More of this to
come..
llvm-svn: 171748
|
| |
|
|
| |
llvm-svn: 171740
|
| |
|
|
| |
llvm-svn: 171737
|
| |
|
|
|
|
| |
All changes done by clang-format itself. No functional changes.
llvm-svn: 171732
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses llvm.org/PR14830.
Before:
unsigned Cost =
TTI.getMemoryOpCost(I->getOpcode(), VectorTy, SI->getAlignment(),
SI->getPointerAddressSpace());
CharSourceRange LineRange =
CharSourceRange::getTokenRange(TheLine.Tokens.front().Tok.getLocation(),
TheLine.Tokens.back().Tok.getLocation());
After:
unsigned Cost = TTI.getMemoryOpCost(I->getOpcode(), VectorTy,
SI->getAlignment(),
SI->getPointerAddressSpace());
CharSourceRange LineRange = CharSourceRange::getTokenRange(
TheLine.Tokens.front().Tok.getLocation(),
TheLine.Tokens.back().Tok.getLocation());
This required rudimentary changes to static initializer lists, but we
are not yet formatting them in a reasonable way. That will be done in a
subsequent patch.
llvm-svn: 171731
|
| |
|
|
|
|
|
| |
In LLVM style, a single space should be enough. In Google style, two
spaces are required.
llvm-svn: 171725
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
virtual void write(ELFWriter *writer, OwningPtr<FileOutputBuffer> &buffer) =
0
After:
virtual void write(ELFWriter *writerrr,
OwningPtr<FileOutputBuffer> &buffer) = 0;
This addresses llvm.org/PR14815.
To implement this I introduced a line type during parsing and moved the
definition of TokenType out of the struct for increased readability.
Should have done the latter in a separate patch, but it would be hard to
pull apart now.
llvm-svn: 171724
|
| |
|
|
|
|
|
|
| |
The case that we wanted to write a test for cannot happen, as the
UnwrappedLineParser already protects against it. Added an assert to
prevent regressions of that assumption.
llvm-svn: 171720
|
| |
|
|
|
|
|
|
|
| |
First check only wrapped with i==8, second wrapped at i==2,8,18,28,...
This fix restores the intended behavior: i==8,18,28,...
Found with -fsanitize=integer.
llvm-svn: 171718
|
| |
|
|
|
|
| |
while parsing #define's.
llvm-svn: 171717
|
| |
|
|
| |
llvm-svn: 171716
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would format:
#define A \
int f(a); int i;
as
#define A \
int f(a);\
int i
The fix will break up macro definitions that could fit a line, but hit
the last column; fixing that is more involved, though, as it requires
looking at the following line.
llvm-svn: 171715
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we'd format
int i;\
// comment
as
int i; // comment
The problem is that the escaped newline is part of the next token, and
thus the raw token text of the comment doesn't start with "//".
llvm-svn: 171713
|
| |
|
|
|
|
|
|
|
|
|
| |
If a token follows directly on an escaped newline, the escaped newline
is stored with the token. Since we re-layout escaped newlines, we need
to treat them just like normal whitespace - thus, we need to increase
the whitespace-length of the token, while decreasing the token length
(otherwise the token length contains the length of the escaped newline
and we double-count it while indenting).
llvm-svn: 171706
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes llvm.org/PR14823.
Before:
local_state->SetString(prefs::kApplicationLocale, parent_local_state
->GetString(prefs::kApplicationLocale));
After:
local_state->SetString(
prefs::kApplicationLocale,
parent_local_state->GetString(prefs::kApplicationLocale));
llvm-svn: 171705
|
| |
|
|
|
|
|
|
|
|
| |
Using added LLVM functionality in r171698. This works in GDB for member
variable pointers but not member function pointers. See the LLVM commit and
GDB bug 14998 for details.
Un-xfailing cases in the GDB 7.5 test suite will follow.
llvm-svn: 171699
|
| |
|
|
|
|
| |
rather than doing it ourselves. This reflects the API changes in r171681.
llvm-svn: 171683
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If we find an unexpected closing brace, we must not stop parsing, as
we'd otherwise not layout anything beyond that point.
If we find a structural error on the highest level we'll not re-indent
anyway, but we'll still want to format within unwrapped lines.
Needed to introduce a differentiation between an expected and unexpected
closing brace.
llvm-svn: 171666
|
| |
|
|
| |
llvm-svn: 171655
|