| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 171654
|
| |
|
|
|
|
|
|
|
|
|
| |
To parse # correctly, we need to know whether it is the first token in a
line - we can deduct this either from the whitespace or seeing that the
token is the first in the file - we already calculate this information.
This patch moves the identification of the first token into the
getNextToken method and stores it inside the FormatToken, so the
UnwrappedLineParser can stay independent of the SourceManager.
llvm-svn: 171640
|
| |
|
|
|
|
|
| |
Uses indent 0 for macros for now and resets the indent state to the
level prior to the preprocessor directive.
llvm-svn: 171639
|
| |
|
|
|
|
|
|
| |
<objc/Protocol.h>. Caused by my recent changes for
various builtin declarations of objc_msgSendSuper
variety. // rdar://12489098
llvm-svn: 171638
|
| |
|
|
|
|
| |
A preprocessor directive cannot be started while we're parsing one.
llvm-svn: 171635
|
| |
|
|
|
|
|
|
| |
Catch some cases I'd missed in r171605 related to unnamed parameters of record
type. This resolves all remaining cases of PR14573 suppression in the GDB 7.5
test suite. Fix to the test suite to follow.
llvm-svn: 171633
|
| |
|
|
|
|
| |
passes to a create-pass function instead of a direct constructor call.
llvm-svn: 171622
|
| |
|
|
|
|
| |
LLVM ignores this data for now - patch for that to follow.
llvm-svn: 171605
|
| |
|
|
|
|
| |
and add stack alignment information.
llvm-svn: 171588
|
| |
|
|
|
|
|
| |
It is somewhat hard to test linkage, so I decided to try to add an assert. This
already found some interesting cases where there were different.
llvm-svn: 171585
|
| |
|
|
|
|
|
|
| |
before doing a storeStrong to it.
// rdar://12530881
llvm-svn: 171572
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of this is still pretty rough (note the load of FIXMEs), but it is
strictly an improvement and fixes various bugs that were related to
macro processing but are also imporant in non-macro use cases.
Specific fixes:
- correctly puts espaced newlines at the end of the line
- fixes counting of white space before a token when escaped newlines are
present
- fixes parsing of "trailing" tokens when eof() is hit
- puts macro parsing orthogonal to parsing other structure
- general support for parsing of macro definitions
Due to the fix to format trailing tokens, this change also includes a
bunch of fixes to the c-index tests.
llvm-svn: 171556
|
| |
|
|
|
|
|
|
|
| |
__strong __block variables, perform objc_storeStrong on
source and destination instead of direct move. This
is done with -O0 and to improve some analysis.
// rdar://12530881
llvm-svn: 171555
|
| |
|
|
| |
llvm-svn: 171545
|
| |
|
|
|
|
| |
Thanks for dgregor for noticing it.
llvm-svn: 171532
|
| |
|
|
|
|
|
|
|
| |
Before: InvalidRegions[ &R] = 0;
After: InvalidRegions[&R] = 0;
This fixes llvm.org/PR14793
llvm-svn: 171522
|
| |
|
|
| |
llvm-svn: 171521
|
| |
|
|
| |
llvm-svn: 171516
|
| |
|
|
| |
llvm-svn: 171505
|
| |
|
|
|
|
|
|
| |
keyword for ObjC properties.
Fixes <rdar://problem/12953378>.
llvm-svn: 171504
|
| |
|
|
|
|
|
|
|
|
| |
actually include it's name.
This is a possible regression of moving to using ImplicitNullDerefEvent.
Fixing this for real (including the parameter name) requires more
plumbing in ImplicitNullDerefEvent. This is just a stop gap fix.
llvm-svn: 171502
|
| |
|
|
| |
llvm-svn: 171501
|
| |
|
|
| |
llvm-svn: 171497
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents code like:
namespace {
class Foo {
Foo(
};
} // comment
from causing segfaults (see llvm.org/PR14774).
llvm-svn: 171495
|
| |
|
|
| |
llvm-svn: 171494
|
| |
|
|
|
|
|
|
|
|
| |
The line information was changed when emitting debug information for all the
DeclRefExprs and we should change it back to get ready for PopClenupBlocks
called from FinishFunction.
rdar://11562117
llvm-svn: 171493
|
| |
|
|
|
|
|
| |
to match those foung in objc.h an avoid spurious warnings.
// rdar://12489098
llvm-svn: 171492
|
| |
|
|
|
|
|
|
| |
previous statement.
rdar://11074996
llvm-svn: 171485
|
| |
|
|
|
|
|
|
|
|
| |
retaining
variable, thus emitting the "switch case is in protected scope" error.
rdar://12952016
llvm-svn: 171484
|
| |
|
|
|
|
| |
class, SwitchCase.
llvm-svn: 171483
|
| |
|
|
|
|
|
|
| |
-autorelease.
rdar://12952025
llvm-svn: 171482
|
| |
|
|
| |
llvm-svn: 171478
|
| |
|
|
|
|
| |
field number was 0 anyhow.
llvm-svn: 171472
|
| |
|
|
|
|
|
|
| |
To do so we have to wait until we know that the type of a variable has been
deduced. Sema::FinalizeDeclaration is the first callback that is used for
decl with or without initializers.
llvm-svn: 171458
|
| |
|
|
| |
llvm-svn: 171457
|
| |
|
|
|
|
|
|
|
|
|
|
| |
c = Block_copy(b);
Block_release(c);
---->
c = [b copy];
<removed>
rdar://9408211
llvm-svn: 171454
|
| |
|
|
| |
llvm-svn: 171439
|
| |
|
|
|
|
| |
static local variable from the parent scope. PR14773.
llvm-svn: 171433
|
| |
|
|
|
|
|
| |
This better reflects when callback is called and what the checkers
are relying on. (Both names meant the same pre-IPA.)
llvm-svn: 171432
|