| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
identifiers into two parts: the part that involves dealing with the
key (which can be re-used) and the ASTReader-specific part that
creates the IdentifierInfos. While I'm at it, StringRef'ify this code,
which was using pair<const char*, unsigned>. No functionality change.
llvm-svn: 173283
|
|
|
|
|
|
|
|
|
|
|
|
| |
bogus with a PCH
that redefined a macro without undef'ing it first.
Proper reconstruction of the macro info history from modules will properly fix this in subsequent commits.
rdar://13016031
llvm-svn: 173281
|
|
|
|
| |
llvm-svn: 173277
|
|
|
|
| |
llvm-svn: 173274
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int aaaa = aaaaa().aaaaa() // force break
.aaaaa();
After:
int aaaa = aaaaa().aaaaa() // force break
.aaaaa();
The other indent is just wrong and confusing.
llvm-svn: 173273
|
|
|
|
| |
llvm-svn: 173272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
bool aaaa = aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
After:
bool aaaa = aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
The other indentation was a nice attempt but doesn't work in many cases.
Not sure what the right long term solution is as the "After: " is still
not nice. We either need to figure out what to do in the cases where it
"doesn't work" or come up with a third solution, e.g. falling back to:
bool aaaa =
aaaaaaaaaaa(
aaaaaaaaaaaaaaaaa);
which should always work and nicely highlight the structure.
llvm-svn: 173268
|
|
|
|
|
|
|
| |
Now correctly formats:
#define A (1)
llvm-svn: 173264
|
|
|
|
|
|
|
|
|
|
| |
Layouting would prevent breaking before + in
a[b + c] = d;
Regression detected by code review.
Also fixes an invalid-read found by the valgrind bot.
llvm-svn: 173262
|
|
|
|
|
|
| |
Before: for (int & a : Values) {}
After: for (int &a : Values) {}
llvm-svn: 173259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having seen more cases, this actually was not a good thing to do in the
first place. We can still improve on what we do now, but breaking after
the "=" is good in many cases.
Before:
aaaaaaaaaaaaa = aa->aaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaa));
After:
aaaaaaaaaaaaa =
aa->aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaa));
llvm-svn: 173257
|
|
|
|
|
|
|
|
|
|
| |
Before: if (int * a = &b) ...
After: if (int *a = &b) ...
Also changed all the existing tests to test the expressions in question
both in a declaration and in an expression context.
llvm-svn: 173256
|
|
|
|
|
|
|
|
| |
operations (as opposed to storage only half/fp16).
Also add some semantic checks for OpenCL half types.
llvm-svn: 173254
|
|
|
|
|
|
|
|
|
| |
We will need a more principled solution, but we should not leave this
unfixed until we come up with one.
Before: void f() { int * a; }
After: void f() { int *a; }
llvm-svn: 173252
|
|
|
|
| |
llvm-svn: 173250
|
|
|
|
|
| |
Also: expletive deleted.
llvm-svn: 173247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only affects styles where BinPackParameters is false.
With AllowAllParametersOnNextLine:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaa, aaaaaaaaaa, aaaaaaaaaa, aaaaaaaaaaa, aaaaaaaaaaa);
Without it:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaa,
aaaaaaaaaaa,
aaaaaaaaaaa);
llvm-svn: 173246
|
|
|
|
|
|
|
|
|
|
|
| |
This gives us the ability to guess better defaults for whether a *
between identifiers is a pointer dereference or binary operator.
Now correctly formats:
void f(a *b);
void f() { f(a * b); }
llvm-svn: 173243
|
|
|
|
|
|
|
|
|
| |
attributes.
Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.
llvm-svn: 173229
|
|
|
|
|
|
|
| |
nulls instead of limiting itself to the language-defined "null pointer
constant".
llvm-svn: 173227
|
|
|
|
| |
llvm-svn: 173215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix a typo, s/BeginSourceAction/BeginSourceFile/, so that the documentation
for FrontendAction::BeginSourceFileAction links correctly to BeginSourceFile;
* Add some basic \file documentation for FrontendAction.h;
* More use of "\brief" instead of repeating the name of the entity being
documented;
* Stop using Doxygen-style "///" comments in FrontendAction.cpp, as they were
polluting the documentation for BeginSourceFile;
* Drop incorrect "\see" markup that broke Doxygen's formatting;
* Other minor documentation fixes.
llvm-svn: 173213
|
|
|
|
|
|
| |
when adding a single attribute to the function.
llvm-svn: 173211
|
|
|
|
|
|
| |
from Saleem Abdulrasool!
llvm-svn: 173208
|
|
|
|
| |
llvm-svn: 173188
|
|
|
|
|
|
| |
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.
llvm-svn: 173186
|
|
|
|
|
|
| |
in my last patch, suggested by Argyrios.
llvm-svn: 173182
|
|
|
|
|
|
|
| |
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616
llvm-svn: 173179
|
|
|
|
|
|
| |
supported.
llvm-svn: 173177
|
|
|
|
|
|
|
| |
would expect, and clean up the return/break inconsistencies. Thanks,
Sebastian!
llvm-svn: 173171
|
|
|
|
|
|
|
|
| |
type with an implicit initializer expression.
Patch from Will Wilson <will@indefiant.com>!
llvm-svn: 173170
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing nextToken() in the UnwrappedLineParser to get the next
non-comment token. This allows us to correctly layout a whole class of
snippets, like:
if /* */(/* */ a /* */) /* */
f() /* */; /* */
else /* */
g();
Fixes a bug in the formatter where we would assume there is a previous
non-comment token.
Also adds the indent level of an unwrapped line to the debug output in
the parser.
llvm-svn: 173168
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaa(aaaaaaaaa, aaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaa)
.aaaaaaaaaaaaaaaaaa();
After:
aaaaaaaaaaaaaaa(aaaaaaaaa, aaaaaaaaa,
aaaaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaa();
llvm-svn: 173160
|
|
|
|
|
|
| |
Before: A = new int * [10]();
After: A = new int *[10]();
llvm-svn: 173150
|
|
|
|
|
|
|
|
| |
This change also makes the serialisation store the required semantics,
fixing an issue where PPC128 was always assumed when re-reading a
128-bit value.
llvm-svn: 173139
|
|
|
|
|
|
| |
This patch changes the behavior of the -fsanitize=address flag, making it use the dynamic runtime library (libclang_rt.asan_osx_dynamic.dylib) instead of the static one. It also drops the CoreFoundation dependency, since the dynamic runtime doesn't need it.
llvm-svn: 173135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were previously hard-coding a particular field index. This was
fine before (because we were obviously guaranteed the presence
of a copy/dispose member) except for (1) alignment padding and
(2) future extensions adding extra members to the header, such
as the extended-layout pointer.
Note that we only introduce the extended-layout pointer in the
presence of structs. (We also seem to be introducing it even
in the presence of an all-non-object layout, but that's a
different potential issue.)
llvm-svn: 173122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to align trailing comments belong to different things.
Before:
void f() { // some function..
}
int a; // some variable..
After:
void f() { // some function..
}
int a; // some variable..
llvm-svn: 173100
|
|
|
|
|
|
|
|
|
| |
Attribute.
This further restricts the use of the Attribute class to the Attribute family of
classes.
llvm-svn: 173099
|
|
|
|
|
|
|
| |
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616
llvm-svn: 173097
|
|
|
|
|
|
|
|
|
| |
Attribute.
This is more code to isolate the use of the Attribute class to that of just
holding one attribute instead of a collection of attributes.
llvm-svn: 173095
|
|
|
|
|
|
|
| |
than DenseMaps and SmallPtrSets for module-visitation data. ~2.6%
speedup for modules.
llvm-svn: 173081
|
|
|
|
|
|
|
|
|
| |
lexical declarations looking for properties when we could more
efficiently check for property mismatches at property declaration
time. Good for ~1% of -fsyntax-only time when most of the properties
we're checking against come from an AST file.
llvm-svn: 173079
|
|
|
|
|
|
| |
change.
llvm-svn: 173078
|
|
|
|
|
|
| |
the other paren parsing methods.
llvm-svn: 173077
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Very similar to what we do for record definitions:
- tighten down what is an enum definition, so that we don't mistake a
function for an enum
- allow common idioms around declarations (we'll want to handle that
more centrally in the future)
We now correctly format:
enum X f() {
a();
return 42;
}
llvm-svn: 173075
|
|
|
|
|
|
|
|
|
|
| |
did a redundant traversal of the lexical declarations in the
superclass. Instead, when we declare a new property, look into the
superclass to see whether we're redeclaring the property. Goot for 1%
of -fsyntax-only time on Cocoa.h and a little less than 3% on my
modules test case.
llvm-svn: 173073
|
|
|
|
|
|
|
|
|
|
| |
crash if Precompilepreamble
is set to true because there is no FileManager at that point.
Patch by Hurcan Solter!
llvm-svn: 173071
|
|
|
|
|
|
|
| |
DeclContext lookups. The performance win is negligible in my tests,
but it's the Right Thing To Do (TM).
llvm-svn: 173068
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
struct Wrapper { <-- 2. Calling default constructor for 'NonTrivial'.
NonTrivial m;
};
Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'.
After:
struct Wrapper {
NonTrivial m;
};
Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'.
^-- 2. Calling default constructor for 'NonTrivial'.
llvm-svn: 173067
|