| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
(means n64 abi) to improve compatibility with GNU tools.
Patch by Jia Liu <proljc@gmail.com>.
llvm-svn: 176187
|
| |
|
|
| |
llvm-svn: 176186
|
| |
|
|
|
|
| |
Otherwise it'll break if there's a record type in the AST by default.
llvm-svn: 176181
|
| |
|
|
|
|
|
|
|
|
| |
Before:
a[a* a] = 1;
After:
a[a * a] = 1;
llvm-svn: 176180
|
| |
|
|
|
|
| |
-fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers.
llvm-svn: 176178
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some discussions, it seems that this is the better path in
the long run. Does not change Chromium style, as there, bin packing
is forbidden by the style guide.
Also fix two minor bugs wrt. formatting:
1. If a call parameter is a function call itself and is split before
the "." or "->", split before the next parameter.
2. If a call parameter is string literal that has to be split onto
two lines, split before the next parameter.
llvm-svn: 176177
|
| |
|
|
| |
llvm-svn: 176174
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since r175326 an implicitly hidden template argument can cause a template
installation to become hidden, even if the template itself has an explicit
default visibility. This requires that we keep track of "late" additions
of the visibility attribute.
This is hopefully the last followup change. It just removes the caching of
visibilities from types so that we can see new attributes even after a type has
been used.
llvm-svn: 176164
|
| |
|
|
|
|
|
|
|
|
|
|
| |
bitfield. CGBitField::StorageAlignment holds the alignment in chars, but
emitMemcpy had been treating it as if it were held in bits, leading to
underaligned memcpys.
Related to PR15348.
Thanks very much to Chandler for the diagnosis.
llvm-svn: 176163
|
| |
|
|
| |
llvm-svn: 176159
|
| |
|
|
| |
llvm-svn: 176157
|
| |
|
|
|
|
|
| |
Everything that cares about visibility also cares about linkage, so I just
moved it to Visibility.h instead of creating a new .h.
llvm-svn: 176155
|
| |
|
|
| |
llvm-svn: 176153
|
| |
|
|
| |
llvm-svn: 176152
|
| |
|
|
|
|
| |
This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c.
llvm-svn: 176151
|
| |
|
|
|
|
|
|
|
|
| |
LLVM codebase.
This potentially reduces a performance optimization of throwing away
PreStmtPurgeDeadSymbols nodes. I'll investigate the performance impact
soon and see if we need something better.
llvm-svn: 176149
|
| |
|
|
|
|
|
|
|
| |
IdentifierInfo::RevertTokenIDToIdentifier() only when it's not already an identifier.
Fixes an assertion hit.
rdar://13288735
llvm-svn: 176148
|
| |
|
|
|
|
|
| |
think of them as having return values that may be computed. Don't
warn when using @return in their comment. // rdar://13189938
llvm-svn: 176147
|
| |
|
|
|
|
|
|
| |
access to a private member to which we have special access.
rdar://12926092
llvm-svn: 176146
|
| |
|
|
| |
llvm-svn: 176145
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is essentially the same problem as r174031: a lazy binding for the first
field of a struct may stomp on an existing default binding for the
entire struct. Because of the way RegionStore is set up, we can't help
but lose the top-level binding, but then we need to make sure that accessing
one of the other fields doesn't come back as Undefined.
In this case, RegionStore is now correctly detecting that the lazy binding
we have isn't the right type, but then failing to follow through on the
implications of that: we don't know anything about the other fields in the
aggregate. This fix adds a test when searching for other kinds of default
values to see if there's a lazy binding we rejected, and if so returns
a symbolic value instead of Undefined.
The long-term fix for this is probably a new Store model; see
<rdar://problem/12701038>.
Fixes <rdar://problem/13292559>.
llvm-svn: 176144
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
isBeforeInTranslationUnit() uses a cache to reduce the expensive work
to compute a common ancestor for two FileIDs. This work is very
expensive, so even caching the latest used FileIDs was a big win.
A closer analysis of the cache before, however, shows that the cache
access pattern would oscillate between a working set of FileIDs, and
thus caching more pairs would be profitable.
This patch adds a side table for extending caching. This side table
is bounded in size (experimentally determined in this case from
a simple Objective-C project), and when the table gets too large
we fall back to the single entry caching before as before.
On Sketch (a small example Objective-C project), this optimization
reduces -fsyntax-only time on SKTGraphicView.m by 5%. This is
for a project that is already using PCH.
Fixes <rdar://problem/13299847>
llvm-svn: 176142
|
| |
|
|
| |
llvm-svn: 176138
|
| |
|
|
| |
llvm-svn: 176137
|
| |
|
|
| |
llvm-svn: 176135
|
| |
|
|
|
|
|
| |
This is causing some problems with some of the builders. It's non-trivial to
reset the target's features.
llvm-svn: 176133
|
| |
|
|
| |
llvm-svn: 176128
|
| |
|
|
|
|
| |
doxygen commands. // rdar://12379053
llvm-svn: 176127
|
| |
|
|
| |
llvm-svn: 176122
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This would error in C++ mode unless the variable also had a cv
qualifier.
e.g.
__attribute__((address_space(2))) float foo = 1.0f; would error but
__attribute__((address_space(2))) const float foo = 1.0f; would not.
llvm-svn: 176121
|
| |
|
|
|
|
| |
adds ivars to an interface. Fixes rdar://13175234
llvm-svn: 176116
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a VarRegion.
Fixes PR15358 and <rdar://problem/13295437>.
Along the way, shorten path diagnostics that say "Variable 'x'" to just
be "'x'". By the context, it is obvious that we have a variable,
and so this just consumes text space.
llvm-svn: 176115
|
| |
|
|
|
|
| |
macros.
llvm-svn: 176114
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that implicitly hidden template arguments can make an instantiation hidden,
it is important to look at more than just the canonical decl of the argument
in order to see if an attribute is available in a more recent decl.
This has the disadvantage of exposing when getExplicitVisibility is called,
but lets us handle cases like
template <typename T>
struct __attribute__((visibility("default"))) barT {
static void zed() {}
};
class foo;
class __attribute__((visibility("default"))) foo;
template struct barT<foo>;
llvm-svn: 176112
|
| |
|
|
|
|
|
|
|
|
| |
GCC applies a pragma weak to a decl if it matches the mangled name. We used
to apply if it matched the plain name.
This patch is a compromise: we apply the pragma only if it matches the name
and the decl has C language linkage.
llvm-svn: 176110
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
if (Intervals[i].getRange().getFirst() < Intervals[i - 1]
.getRange().getLast()) {}
After:
if (Intervals[i].getRange().getFirst() <
Intervals[i - 1].getRange().getLast()) {}
llvm-svn: 176092
|
| |
|
|
|
|
| |
Sometimes android linker is "arm-linux-androideabi-ld", and not just "ld".
llvm-svn: 176088
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
for (const aaaaaaaaaaaaaaaaaaaaa &
aaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
After:
for (const aaaaaaaaaaaaaaaaaaaaa &aaaaaaaaa :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}
llvm-svn: 176087
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Empty lines followed by line comments are often used to highlight the
comment. Empty lines somewhere else are usually left over from manual or
automatic formatting and should probably be removed.
Before (clang-format would keep):
S s = {
a,
b
};
After:
S s = { a, b };
llvm-svn: 176086
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We might want to move towards doing this if the formatting can be
significantly improved, but we need to carefully evaluate the different
situations first.
Before (the string literal was split by clang-format here):
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa, aaaaaa("aaa aaaaa aaa aaa aaaaa aaa "
"aaaaa aaa aaa aaaaaa"));
After:
aaaaaaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaa,
aaaaaa("aaa aaaaa aaa aaa aaaaa aaa aaaaa aaa aaa aaaaaa"));
llvm-svn: 176084
|
| |
|
|
|
|
| |
subdirectory. Otherwise, while configuring the build tree for the first time, Clang unit tests could avoid being added to 'check-clang' command, and thus avoid being built and executed.
llvm-svn: 176080
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory
CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))
for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S
llvm-svn: 176076
|
| |
|
|
| |
llvm-svn: 176074
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, we need to look through derived-to-base casts when creating
temporary object regions (added in r175854). However, if the temporary
is a pointer (rather than a struct/class instance), we need to /preserve/
the base casts that have been applied.
This also ensures that we really do create a new temporary region when
we need to: MaterializeTemporaryExpr and lvalue CXXDefaultArgExprs.
Fixes PR15342, although the test case doesn't include the crash because
I couldn't isolate it.
llvm-svn: 176069
|
| |
|
|
|
|
|
|
|
|
|
|
| |
With the new support for trivial copy constructors, we are not always
consistent about whether a CXXTempObjectRegion gets reused or created
from scratch, which affects whether qualifiers are preserved. However,
we probably don't care anyway.
This also switches to using the current PrintingPolicy for the type,
which means C++ types don't get a spurious 'struct' prefix anymore.
llvm-svn: 176068
|
| |
|
|
|
|
| |
Avoids warning twice on same shift.
llvm-svn: 176056
|
| |
|
|
|
|
|
|
|
|
|
|
| |
type.
This addresses a case when we inline a wrong method due to incorrect
dynamic type inference. Specifically, when user code contains a method from init
family, which creates an instance of another class.
Use hasRelatedResultType() to find out if our inference rules should be triggered.
llvm-svn: 176054
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
or predecessor.
These nodes are never consulted by any analyzer client code, so they are
used only for machinery for removing dead bindings. Once successor nodes
are generated they can be safely removed.
This greatly reduces the amount of nodes that are generated in some case,
lowering the memory regression when analyzing Sema.cpp introduced by
r176010 from 14% to 2%.
llvm-svn: 176050
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New type matchers:
* recordType
* elaboratedType
New narrowing matchers:
* hasQualifier
* namesType
* hasDeclContext
Added tests and updated LibASTMatchersReference.
Reviewers: klimek
llvm-svn: 176047
|
| |
|
|
|
|
|
|
| |
This reverts commit 176009.
The commit is a likely cause of several buildbot failures.
llvm-svn: 176044
|