| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- This slightly decouples the path handling, since before the group sometimes
dominated the "use sysroot" bit, but it was still passed in via the API.
- No functionality change.
llvm-svn: 173855
|
|
|
|
| |
llvm-svn: 173854
|
|
|
|
| |
llvm-svn: 173853
|
|
|
|
|
|
| |
minor cleanup.
llvm-svn: 173852
|
|
|
|
|
|
|
| |
references to their UTIF-8 encoding. Reviewed offline by Doug.
// rdar://12392215
llvm-svn: 173850
|
|
|
|
|
|
|
|
|
|
|
| |
implementation; this is much more inline with the original implementation
(i.e., pre-ubsan) and does not require run-time library support.
The trapping implementation can be invoked using either '-fcatch-undefined-behavior'
or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter
being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed.
llvm-svn: 173848
|
|
|
|
| |
llvm-svn: 173841
|
|
|
|
|
|
|
| |
Fix to change r173414 that lead to Clang changing const to constexpr even under
-Wno-static-float-init.
llvm-svn: 173835
|
|
|
|
|
|
|
| |
No functional changes. Also removed experimental-warning from all of
clang-format's files, as it is no longer accurate.
llvm-svn: 173830
|
|
|
|
|
|
|
|
|
|
|
|
| |
if they were already concatenated in source using the spelling locations
even if they came from a macro expansion.
This fixes an issue where a GUID passed as macro argument ends up
malformed after preprocessing because we added spaces inside it.
rdar://13016645
llvm-svn: 173826
|
|
|
|
|
|
|
|
|
|
|
| |
subsequent commands from being executed.
The diagnostics generation isn't designed for this use case, so add a note to
fix this in the very near future. For now, just generated the diagnostics for
the first failing command.
Part of rdar://12984531
llvm-svn: 173825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaa(aaaaaa( // comment
aaaaaaa));
<big mess>
After:
aaaaaaa(aaaaaa( // comment
aaaaaaaa));
function(/* parameter 1 */ aaaaaaa,
/* parameter 2 */ aaaaaaa,
/* parameter 3 */ aaaaaaa,
/* parameter 4 */ aaaaaaa);
(the latter example was only wrong in the one-arg-per-line mode, e.g. in
Google style).
llvm-svn: 173821
|
|
|
|
|
|
|
|
|
|
|
| |
TopLevelDeclInObjCContainer bit.
Fixes accurately getting a cursor inside an objc container containing a struct definition,
from a PCH/preamble file.
rdar://12584613
llvm-svn: 173811
|
|
|
|
|
|
|
|
|
|
|
|
| |
The style guide only forbids this for function declarations. So,
now
someFunction(
aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa, aaaaaaaaaaaa);
Is allowed in Chromium mode.
llvm-svn: 173806
|
|
|
|
|
|
| |
It needs to be compatible with C++03.
llvm-svn: 173805
|
|
|
|
| |
llvm-svn: 173803
|
|
|
|
| |
llvm-svn: 173802
|
|
|
|
|
|
|
|
|
|
| |
This is
a) More efficient.
b) Important as we move forward with further metrics for penalty.
No functional changes intended.
llvm-svn: 173801
|
|
|
|
|
|
| |
Not all changes might be ideal, but IMO all are acceptable.
llvm-svn: 173793
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();
After:
SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();
llvm-svn: 173792
|
|
|
|
|
|
| |
Also refactor the surrounding code a little.
llvm-svn: 173791
|
|
|
|
|
|
| |
C++11 allows that.
llvm-svn: 173789
|
|
|
|
|
|
|
|
|
| |
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.
llvm-svn: 173788
|
|
|
|
|
|
|
| |
This needs some more thinking, e.g. for namespaces, chains of if-else
if, ...
llvm-svn: 173787
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those empty lines waste vertical whitespace and almost never
increase readability.
Before:
void f() {
DoSomething();
}
After:
void f() {
DoSomething();
}
llvm-svn: 173785
|
|
|
|
| |
llvm-svn: 173779
|
|
|
|
|
|
| |
instantiation.
llvm-svn: 173768
|
|
|
|
|
|
|
| |
It turns out that there's no correctness bug here (because we can't have a type
definition in this location), but there was a diagnostic bug.
llvm-svn: 173766
|
|
|
|
|
|
| |
forms of 'main' which we accept as an extension.
llvm-svn: 173758
|
|
|
|
|
|
|
| |
pretty-print them properly (modulo the more general badness in alignment
attribute printing).
llvm-svn: 173752
|
|
|
|
|
|
|
| |
working, and add the missing attribute spellings. This brings _pascal,
_fastcall, _stdcall and _cdecl to life in -fborland-extensions mode.
llvm-svn: 173749
|
|
|
|
|
|
| |
decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>.
llvm-svn: 173747
|
|
|
|
|
|
|
|
|
| |
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.
llvm-svn: 173746
|
|
|
|
|
|
|
| |
For fun, I added a comedy "actually obey the C++11 POD rules" option
which nobody is allowed to use.
llvm-svn: 173744
|
|
|
|
|
|
|
|
|
|
| |
This required plumbing through a new flag to determine whether a ParmVarDecl is
actually a parameter of a function declaration (as opposed to a function
typedef etc, where the attribute is prohibited). Weirdly, this attribute (just
like [[noreturn]]) cannot be applied to a function type, just to a function
declaration (and its parameters).
llvm-svn: 173726
|
|
|
|
|
|
| |
error. Jordan is right.
llvm-svn: 173713
|
|
|
|
|
|
| |
<rdar://problem/13098104>.
llvm-svn: 173708
|
|
|
|
|
|
|
|
| |
-fno-modules-global-index -cc1 option to allow one to disable the
index for performance testing purposes, but with a 10% win in
-fsyntax-only time, there is no reason a user would do this.
llvm-svn: 173707
|
|
|
|
|
|
|
| |
pool in the global module index is not worthwhile. Update comments to
limit the scope of the global module index to identifiers.
llvm-svn: 173705
|
|
|
|
| |
llvm-svn: 173702
|
|
|
|
|
|
| |
Fixes a crash. Thanks, Richard.
llvm-svn: 173701
|
|
|
|
| |
llvm-svn: 173700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa = aaaaaaaaaaaaaaa
.aaaaaaaaaaaaaaaa;
aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) {}
After:
for (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaa =
aaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaa;
aaaaaaaaaaa != aaaaaaaaaaaaaaaaaaa; ++aaaaaaaaaaa) {}
llvm-svn: 173695
|
|
|
|
|
|
|
|
|
|
| |
ModuleManager::visit() by keeping a free list of the two data
structures used to store state (a preallocated stack and a visitation
number vector). Improves -fsyntax-only performance for my modules test
case by 2.8%. Modules has pulled ahead by almost 10% with the global
module index.
llvm-svn: 173692
|
|
|
|
|
|
|
|
|
|
| |
This would be against the style guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Function_Declarations_and_Definitions#Function_Declarations_and_Definitions
Not sure what to do as a last resort if the function signature does not
fit onto a single line in Google style ..
llvm-svn: 173690
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
TypeSpecDecl *TypeSpecDecl::Create(ASTContext &C, DeclContext *DC,
SourceLocation L, IdentifierInfo *II,
Type *T) {}
After:
TypeSpecDecl *
TypeSpecDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
IdentifierInfo *II, Type *T) {}
This fixes llvm.org/PR14717.
llvm-svn: 173688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
Constructor
: LooooooooooooooooooooongVariable(
LooooooooooooooooooooongValue) {}
After:
Constructor
: LooooooooooooooooooooongVariable(
LooooooooooooooooooooongValue) {}
llvm-svn: 173685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before (in good cases):
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa,
aaaa)) {}
After:
for (auto aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
for (auto aaaaaaaaaaaaaaaaaaaa :
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa, aaaa)) {}
llvm-svn: 173684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before we did not really systematically format those. Now, we format the
different cases as:
- 1 Line: a ? b : c;
- 2 Lines: short ? loooooooooong
: loooooooooong
- 2 Lines: loooooooooooooooong
? short : short
- 3 Lines: loooooooooooooooong
? loooooooooooooong
: loooooooooooooong
Not sure whether "?" and ":" should go on the new line, but it seems to
be the most consistent approach.
llvm-svn: 173683
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Use a hanging ident for function calls nested in binary expressions.
E.g.:
int aaaaa = aaaaaaaaa && aaaaaaaaaa(
aaaaaaaaaa);
2. Slightly improve heuristic for builder type expressions and reduce
penalty for breaking before "." and "->" in those.
3. Remove mostly obsolete metric of decreasing indent level. This
fixes: llvm.org/PR14931.
Changes #1 and #2 were necessary to keep tests passing after #3.
llvm-svn: 173680
|