| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
- The return type should be a pointer to the class type.
- Make the condition more specific.
rdar://problem/13359718
llvm-svn: 182504
|
| |
|
|
|
|
|
|
|
|
|
| |
than 3 columns.
These are legitimate control-flow edges, but visually they add
no value.
Implements <rdar://problem/13941325>.
llvm-svn: 182502
|
| |
|
|
| |
llvm-svn: 182501
|
| |
|
|
| |
llvm-svn: 182500
|
| |
|
|
|
|
|
|
|
|
| |
This is important if the user has multiple Xcodes installed on their
system -- we use xcodebuild to do a version check, and therefore we need
to make sure we match the actual build command.
Reported by Howard Ling!
llvm-svn: 182498
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently, blocks instantiated in templates lose their "signature as
written"; it's not clear if this is intentional. Change the analyzer's
use of BlockDecl::getSignatureAsWritten to check whether or not the
signature is actually there.
<rdar://problem/13954714>
llvm-svn: 182497
|
| |
|
|
| |
llvm-svn: 182488
|
| |
|
|
| |
llvm-svn: 182476
|
| |
|
|
| |
llvm-svn: 182468
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of selectively storing some changes and directly generating
replacements for others, we now notify the WhitespaceManager of the
whitespace before every token (and optionally with more changes inside
tokens).
Then, we run over all whitespace in the very end in original source
order, where we have all information available to correctly align
comments and escaped newlines.
The future direction is to pull more of the comment alignment
implementation that is now in the BreakableToken into the
WhitespaceManager.
This fixes a bug when aligning comments or escaped newlines in unwrapped
lines that are handled out of order:
#define A \
f({ \
g(); \
});
... now gets correctly layouted.
llvm-svn: 182467
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-format was a bit too aggressive when trying to keep labels and
values on the same line.
Before:
llvm::outs()
<< "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
After:
llvm::outs() << "aaaaaaaaaaaaaaaaaaa: "
<< aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa);
llvm-svn: 182458
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only affects styles that prevent bin packing. There, a break after
a template declaration also forced a line break after the function name.
Before:
template <class SomeType, class SomeOtherType>
SomeType
SomeFunction(SomeType Type, SomeOtherType OtherType) {}
After:
template <class SomeType, class SomeOtherType>
SomeType SomeFunction(SomeType Type, SomeOtherType OtherType) {}
This fixes llvm.org/PR16072.
llvm-svn: 182457
|
| |
|
|
|
|
|
| |
Reduce the preference for breaking before a trailing 'const' according
to review comments on r182362.
llvm-svn: 182455
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If clang-format is confronted with long and deeply nested lines (e.g.
complex static initializers or function calls), it can currently try too
hard to find the optimal solution and never finish. The reason is that
the memoization does not work effectively for deeply nested lines.
This patch removes an earlier workaround and instead opts for
accepting a non-optimal solution in rare cases. However, it only does
so only in cases where it would have to analyze an excessive number of
states (currently set to 10000 - the most complex line in Format.cpp
requires ~800 states) so this should not change the behavior in a
relevant way.
llvm-svn: 182449
|
| |
|
|
|
|
|
|
|
| |
The crash is triggered by the newly added option (-analyzer-config report-in-main-source-file=true) introduced in r182058.
Note, ideally, we’d like to report the issue within the main source file here as well.
For now, just do not crash.
llvm-svn: 182445
|
| |
|
|
|
|
| |
operand of a unary address-of expression, not for *all* expressions!
llvm-svn: 182436
|
| |
|
|
|
|
| |
function templates can use it as a return type.
llvm-svn: 182433
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*that* easy...
Try a bit harder to disambiguate. This is mostly straightforward, but for
=-style initializers, we actually need to know where an expression ends:
[foo = bar baz]
is a message send, whereas
[foo = bar + baz]
is a lambda-introducer. Handle this by parsing the expression eagerly, and
replacing it with an annotation token. By chance, we use the *exact same*
parsing rules in both cases (except that we need to assume we're inside a
message send for the parse, to turn off various forms of inapplicable
error recovery).
llvm-svn: 182432
|
| |
|
|
|
|
|
|
| |
dive-in and out of a subexpression.
Fixes <rdar://problem/13941891>.
llvm-svn: 182426
|
| |
|
|
|
|
| |
does.
llvm-svn: 182425
|
| |
|
|
|
|
|
| |
variables when they are used in such unevaluated
contexts as __typeof, etc. // rdar://13942025
llvm-svn: 182423
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
common function. The C++1y contextual implicit conversion rules themselves are
not yet implemented, however.
This also fixes a subtle bug where template instantiation context notes were
dropped for diagnostics coming from conversions for integral constant
expressions -- we were implicitly slicing a SemaDiagnosticBuilder into a
DiagnosticBuilder when producing these diagnostics, and losing their context
notes in the process.
llvm-svn: 182406
|
| |
|
|
|
|
| |
duplicate lookup in the insertion case
llvm-svn: 182404
|
| |
|
|
|
|
|
|
| |
them from
(no intended behavior change)
llvm-svn: 182403
|
| |
|
|
| |
llvm-svn: 182400
|
| |
|
|
| |
llvm-svn: 182395
|
| |
|
|
| |
llvm-svn: 182386
|
| |
|
|
|
|
|
|
|
| |
With this patch, clang-format will try to keep the cursor at the
original code position in editor integrations (implemented for emacs and
vim). This means, after formatting, clang-format will try to keep the
cursor on the same character of the same token.
llvm-svn: 182373
|
| |
|
|
| |
llvm-svn: 182368
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
void someLongFunction(
int someLongParameter) const;
After:
void someLongFunction(int someLongParameter)
const;
Also slightly cleanup tests.
llvm-svn: 182362
|
| |
|
|
|
|
|
|
| |
attach, rather than merging all comments on the declaration chain. This gives a
more faithful dump, and has the side benefit of unbreaking uses of dump() from
within AST deserialization (where the redeclaration chain may not be sane).
llvm-svn: 182350
|
| |
|
|
|
|
| |
Fixes <rdar://problem/13942300>.
llvm-svn: 182342
|
| |
|
|
|
|
|
| |
@class command on an @interface declaration. Turn off
the warning for this case. // rdar://13927330
llvm-svn: 182334
|
| |
|
|
| |
llvm-svn: 182333
|
| |
|
|
|
|
| |
nonexistent Darwin-specific files on every module build.
llvm-svn: 182331
|
| |
|
|
|
|
|
|
|
| |
This resolves the last of the PR14606 failures in the GDB 7.5 test
suite. (but there are still unresolved issues in the imported_decl case
- we need to implement optional/lazy decls for functions & variables
like we already do for types)
llvm-svn: 182329
|
| |
|
|
|
|
|
| |
AsmPrinter::EmitLinkage() does not handle dllimport linkage. The LLVM
verifier should also be fixed to reject this.
llvm-svn: 182320
|
| |
|
|
|
|
|
|
| |
protocols that declare the same property of incompatible
types, issue a warning when class implementation synthesizes
the property. // rdar://13075400
llvm-svn: 182316
|
| |
|
|
| |
llvm-svn: 182309
|
| |
|
|
| |
llvm-svn: 182305
|
| |
|
|
| |
llvm-svn: 182294
|
| |
|
|
|
|
| |
configuration files invalid.
llvm-svn: 182290
|
| |
|
|
| |
llvm-svn: 182280
|
| |
|
|
| |
llvm-svn: 182278
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the C++ standard requires that this lookup take place only at the
definition point of a virtual destructor (C++11 [class.dtor]p12), the
Microsoft ABI may require the compiler to emit a deleting destructor
for any virtual destructor declared in the TU, including ones without
a body, requiring an operator delete() lookup for every virtual
destructor declaration. The result of the lookup should be the same
no matter which declaration is used (except in weird corner cases).
This change will cause us to reject some valid TUs in Microsoft ABI
mode, e.g.:
struct A {
void operator delete(void *);
};
struct B {
void operator delete(void *);
};
struct C : A, B {
virtual ~C();
};
As Richard points out, every virtual function declared in a TU
(including this virtual destructor) is odr-used, so it must be defined
in any program which declares it, or the program is ill formed, no
diagnostic required. Because we know that any definition of this
destructor will cause the lookup to fail, the compiler can choose to
issue a diagnostic here.
Differential Revision: http://llvm-reviews.chandlerc.com/D822
llvm-svn: 182270
|
| |
|
|
| |
llvm-svn: 182269
|
| |
|
|
|
|
| |
Fixes <rdar://problem/13933913>.
llvm-svn: 182268
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
selectany only applies to externally visible global variables. It has
the effect of making the data weak_odr.
The MSDN docs suggest that unused definitions can only be dropped at
linktime, so Clang uses weak instead of linkonce. MSVC optimizes away
references to constant selectany data, so it must assume that there is
only one definition, hence weak_odr.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D814
llvm-svn: 182266
|
| |
|
|
| |
llvm-svn: 182264
|
| |
|
|
|
|
| |
module but isn't itself part of a module.
llvm-svn: 182263
|