| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 182678
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating path notes, implicit function bodies are shown at the call
site, so that, say, copying a POD type in C++ doesn't jump you to a header
file. This is especially important when the synthesized function itself
calls another function (or block), in which case we should try to jump the
user around as little as possible.
By checking whether a called function has a body in the AST, we can tell
if the analyzer synthesized the body, and if we should therefore collapse
the call down to the call site like a true implicitly-defined function.
<rdar://problem/13978414>
llvm-svn: 182677
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new edge algorithm would keep track of the previous location in each
location context, so that it could draw arrows coming in and out of each
inlined call. However, it tried to access the location of the call before
it was actually set (at the CallEnter node). This only affected
unterminated calls at the end of a path; calls with visible exit nodes
already had a valid location.
This patch ditches the location context map, since we're processing the
nodes in order anyway, and just unconditionally updates the PrevLoc
variable after popping out of an inlined call.
<rdar://problem/13983470>
llvm-svn: 182676
|
| |
|
|
| |
llvm-svn: 182675
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make this more consistent with 'getOrCreateType' & clarify the
distinction between the two. The only thing I couldn't quite communicate
in the name is that getOrCreateTypeDeclaration may actually produce a
full definition (in -fno-limit-debug-info) but the point is to call it
whenever only a declaration is needed & the implementation can choose
whether to provide a declaration or definition.
(also, unfortunately, getOrCreateType can produce declarations too - we
should sure this up by making it not do that - any caller that can
tolerate a declaration should be calling getOrCreateTypeDeclaration
instead)
llvm-svn: 182674
|
| |
|
|
|
|
|
|
|
|
|
|
| |
types
Perhaps we should just suppress this, rather than erroring, but since we
have the infrastructure for it I figured I'd use it - if this is
determined to be not the right thing we should probably remove that
infrastructure entirely. I guess it's lying around from the early days
of implementing debug info support.
llvm-svn: 182673
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a FIXME in CodeGenModule::SetLLVMFunctionAttributesForDefinition.
When a function is declared cold we can now generate the IR attribute in
addition to marking the function to be optimized for size.
I tried adding a separate CHECK in the existing test, but it was
failing. I suppose CHECK matches one line exactly once? This would be
a problem if the attributes are listed in a different order, though they
seem to be sorted.
llvm-svn: 182666
|
| |
|
|
| |
llvm-svn: 182660
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for labels in inline assembly that aren't in the lookup tables. E.g.,
__asm {
a:
jmp a
}
rdar://13983623
llvm-svn: 182659
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Added stack of preprocessor branching directives, and ignore all tokens
inside #if 0 except for preprocessor directives.
Reviewers: klimek, djasper
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D855
llvm-svn: 182658
|
| |
|
|
|
|
| |
Patch by Will Wilson.
llvm-svn: 182651
|
| |
|
|
|
|
| |
matches MSVC behavior, as well as allows us to properly link libraries such as the ones provided by the MSDN examples.
llvm-svn: 182647
|
| |
|
|
|
|
|
|
| |
Sanitizer runtime intercepts functions from librt. Not doing this will fail
if the librt dependency is not present at program startup (ex. comes from a
dlopen()ed library).
llvm-svn: 182645
|
| |
|
|
| |
llvm-svn: 182642
|
| |
|
|
| |
llvm-svn: 182632
|
| |
|
|
|
|
|
|
|
|
| |
instead of trying to continue in an invalid state.
Also don't let libclang create a PCH with such an error.
Fixes rdar://13953768
llvm-svn: 182629
|
| |
|
|
| |
llvm-svn: 182626
|
| |
|
|
|
|
| |
building the resulting expression because it invokes a deleted constructor.
llvm-svn: 182624
|
| |
|
|
| |
llvm-svn: 182620
|
| |
|
|
| |
llvm-svn: 182615
|
| |
|
|
|
|
| |
Before: f(new vector<int> { 1, 2, 3 });
After: f(new vector<int>{ 1, 2, 3 });
llvm-svn: 182614
|
| |
|
|
|
|
|
|
| |
new arrows algorithm.
This essentially combines the tests in plist-output.m and plist-alternate-output.m.
llvm-svn: 182612
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we started sequences to align for single line comments when
the previous line had a trailing comment, but the sequence was broken
for other reasons.
Now we re-format:
// a
// b
f(); // c
to:
// a
// b
f(); // c
llvm-svn: 182608
|
| |
|
|
|
|
|
|
|
|
| |
Now correctly leaves:
f(); // comment
// comment
g(); // comment
... alone if the middle comment was aligned with g() before formatting.
llvm-svn: 182605
|
| |
|
|
|
|
|
| |
The ARM cycle-counter can be restricted by the operating system; it's
worth warning potential users of this issue.
llvm-svn: 182604
|
| |
|
|
|
|
| |
Also fix a minor bug for constructor initializers with braced init lists.
llvm-svn: 182601
|
| |
|
|
|
|
| |
Before: vector<int> v{ -1};
After: vector<int> v{-1};
llvm-svn: 182597
|
| |
|
|
|
|
|
|
|
|
| |
Put this somewhere on your path and use:
git clang-format
Awesome work by Mark Lodato. Many thanks!
llvm-svn: 182596
|
| |
|
|
| |
llvm-svn: 182589
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would align:
f(); // comment
// other comment
g();
Even if // other comment was at the start of the line. Now we do not
align trailing comments if they have been already aligned correctly
with the next line.
Thus,
f(); // comment
// other comment
g();
will not be changed, while:
f(); // comment
// other commment
g();
will lead to the two trailing comments being aligned.
llvm-svn: 182577
|
| |
|
|
|
|
|
|
|
|
|
| |
Replaces the use of WhitespaceStart + WhitspaceLength.
This made a bug in the formatter obvous where we would incorrectly
calculate the next column.
FIXME: There's a similar bug left regarding TokenLength. We should
probably also move to have a TokenRange instead.
llvm-svn: 182572
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
vector<int> x { 1, 2, 3 };
After:
vector<int> x{ 1, 2, 3 };
Also add a style option to remove the spaces inside braced lists,
so that the above becomes:
std::vector<int> v{1, 2, 3};
llvm-svn: 182570
|
| |
|
|
| |
llvm-svn: 182569
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows formatting of C++11 braced init list constructs, like:
vector<int> v { 1, 2, 3 };
f({ 1, 2 });
This involves some changes of how tokens are handled in the
UnwrappedLineFormatter. Note that we have a plan to evolve the
design of the token flow into one where we create all tokens
up-front and then annotate them in the various layers (as we
currently already have to create all tokens at once anyway, the
current abstraction does not help). Thus, this introduces
FIXMEs towards that goal.
llvm-svn: 182568
|
| |
|
|
|
|
| |
get removed.
llvm-svn: 182562
|
| |
|
|
|
|
|
|
|
|
|
| |
specialization with modules enabled. Just don't merge them at all for now;
we'll revisit this when support for template merging is added.
In passing, make Decl::dump() a little safer to use with PCH/modules, by making
it not deserialize any additional declarations. From a debugger you can call
decls_begin() or similar first if you want to dump all child decls.
llvm-svn: 182544
|
| |
|
|
|
|
|
|
|
| |
* Treat _Atomic(T) as a literal type if T is a literal type.
* Evaluate expressions of this type properly.
* Fix a lurking bug where we built completely bogus ASTs for converting to
_Atomic types in C++ in some cases, caught by the tests for this change.
llvm-svn: 182541
|
| |
|
|
|
|
|
|
|
|
| |
pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes.
For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx
Patch reviewed by Richard Smith.
llvm-svn: 182535
|
| |
|
|
| |
llvm-svn: 182533
|
| |
|
|
|
|
| |
rdar://problem/13359718
llvm-svn: 182524
|
| |
|
|
| |
llvm-svn: 182514
|
| |
|
|
| |
llvm-svn: 182509
|
| |
|
|
| |
llvm-svn: 182506
|
| |
|
|
|
|
|
|
| |
text.
Fixes <rdar://problem/13949982>
llvm-svn: 182505
|
| |
|
|
|
|
|
|
|
| |
- 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
|