| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
a more aggressive stack coloring.
Patch by John McCall with help by Shuxin Yang.
rdar://13115369
llvm-svn: 177819
|
| |
|
|
|
|
|
|
|
|
|
| |
Changing -ccc-install-dir to affect cc1's resource-dir setting broke our
internal LNT tests. After discussing the situation with Jim, we've decided to
pursue an alternate approach. We really want the resource-dir to be located
relative to clang, even when using -ccc-install-dir, but we're going to
add a fallback setting for the libc++ headers if they don't exist alongside
the compiler.
llvm-svn: 177815
|
| |
|
|
|
|
|
|
|
|
|
|
| |
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.
rdar://13195034
llvm-svn: 177813
|
| |
|
|
|
|
|
| |
TemplateSpecializationType during template type diffing. This allows the
correct printing of diffing qualifiers on templates.
llvm-svn: 177809
|
| |
|
|
|
|
|
|
|
|
|
| |
In C, comparisons between signed and unsigned numbers are always done in
unsigned-space. Thus, we should know that "i >= 0U" is always true, even
if 'i' is signed. Similarly, "u >= 0" is also always true, even though '0'
is signed.
Part of <rdar://problem/13239003> (false positives related to std::vector)
llvm-svn: 177806
|
| |
|
|
|
|
|
|
|
|
| |
For two concrete locations, we were producing another concrete location and
then casting it to an integer. We should just create a nonloc::ConcreteInt
to begin with.
No functionality change.
llvm-svn: 177805
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We can support the full range of comparison operations between two locations
by canonicalizing them as subtraction, as in the previous commit.
This won't work (well) if either location includes an offset, or (again)
if the comparisons are not consistent about which region comes first.
<rdar://problem/13239003>
llvm-svn: 177803
|
| |
|
|
|
|
| |
...and adopt them in the analyzer.
llvm-svn: 177802
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Canonicalizing these two forms allows us to better model containers like
std::vector, which use "m_start != m_finish" to implement empty() but
"m_finish - m_start" to implement size(). The analyzer should have a
consistent interpretation of these two symbolic expressions, even though
it's not properly reasoning about either one yet.
The other unfortunate thing is that while the size() expression will only
ever be written "m_finish - m_start", the comparison may be written
"m_finish == m_start" or "m_start == m_finish". Right now the analyzer does
not attempt to canonicalize those two expressions, since it doesn't know
which length expression to pick. Doing this correctly will probably require
implementing unary minus as a new SymExpr kind (<rdar://problem/12351075>).
For now, the analyzer inverts the order of arguments in the comparison to
build the subtraction, on the assumption that "begin() != end()" is
written more often than "end() != begin()". This is purely speculation.
<rdar://problem/13239003>
llvm-svn: 177801
|
| |
|
|
|
|
|
|
|
|
| |
We just treat this as opaque symbols, but even that allows us to handle
simple cases where the same condition is tested twice. This is very common
in the STL, which means that any project using the STL gets spurious errors.
Part of <rdar://problem/13239003>.
llvm-svn: 177800
|
| |
|
|
|
|
|
| |
for a getter used in property-dot syntax, if geter has its own
comment use it. // rdar://12791315
llvm-svn: 177797
|
| |
|
|
|
|
| |
and ensure it works with subscripting.
llvm-svn: 177789
|
| |
|
|
| |
llvm-svn: 177788
|
| |
|
|
|
|
|
|
| |
linker via --dynamic-list instead of using --export-dynamic. This reduces the
size of the dynamic symbol table, and thus of the binary (in some cases by up
to ~30%).
llvm-svn: 177783
|
| |
|
|
|
|
|
|
|
|
|
|
| |
isIncompleteType() returns true or false for template types depending on whether
the type is instantiated yet. In this context, that's arbitrary. The better way
to check for a complete type is RequireCompleteType().
Thanks to Eli Friedman for noticing this!
<rdar://problem/12700799>
llvm-svn: 177768
|
| |
|
|
|
|
|
|
| |
allowed to.
This eliminates excessive rebuilds of the global module cache.
llvm-svn: 177766
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The algorithm used here was ridiculously slow when a potential back-edge
pointed to a node that already had a lot of successors. The previous commit
makes this feature unnecessary anyway.
This reverts r177468 / f4cf6b10f863b9bc716a09b2b2a8c497dcc6aa9b.
Conflicts:
lib/StaticAnalyzer/Core/BugReporter.cpp
llvm-svn: 177765
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a given bug equivalence class, we'd like to emit the report with the
shortest path. So far to do this we've been trimming the ExplodedGraph to
only contain relevant nodes, then doing a reverse BFS (starting at all the
error nodes) to find the shortest paths from the root. However, this is
fairly expensive when we are suppressing many bug reports in the same
equivalence class.
r177468-9 tried to solve this problem by breaking cycles during graph
trimming, then updating the BFS priorities after each suppressed report
instead of recomputing the whole thing. However, breaking cycles is not
a cheap operation because an analysis graph minus cycles is still a DAG,
not a tree.
This fix changes the algorithm to do a single forward BFS (starting from the
root) and to use that to choose the report with the shortest path by looking
at the error nodes with the lowest BFS priorities. This was Anna's idea, and
has the added advantage of requiring no update step: we can just pick the
error node with the next lowest priority to produce the next bug report.
<rdar://problem/13474689>
llvm-svn: 177764
|
| |
|
|
|
|
| |
Debugging aid only, no functionality change.
llvm-svn: 177762
|
| |
|
|
|
|
|
|
|
| |
-Serialize the macro directives history into its own section
-Get rid of the macro updates section
-When de/serializing an identifier from a module, associate only one macro per
submodule that defined+exported it.
llvm-svn: 177761
|
| |
|
|
|
|
| |
submodule ID.
llvm-svn: 177760
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For non-dynamic classes (no virtual bases), member data pointers are
simple offsets from the base of the record. Dynamic classes use an
aggregate for member data pointers and are therefore currently
unsupported.
Unlike Itanium, the ms ABI uses 0 to represent null for polymorphic
classes. Non-polymorphic classes use -1 like Itanium, since 0 is a
valid field offset.
Reviewers: rjmccall
CC: timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D558
llvm-svn: 177753
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
interaction to eliminate a pile of extraneous stats().
The refactoring in r177367 introduced a serious performance bug where
the "lazy" resolution of module file names in the global module index
to actual module file entries in the module manager would perform
repeated negative stats(). The new interaction requires the module
manager to inform the global module index when a module file has been
loaded, eliminating the extraneous stat()s and a bunch of bookkeeping
on both sides.
llvm-svn: 177750
|
| |
|
|
|
|
|
|
| |
for self.GetterName where GetterName is the getter method
for a property with name different from the property name
(declared via a property getter attribute) // rdar://12791315
llvm-svn: 177744
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It turns out that
-foo;
can be an objective C method declaration. So instead of the previous
solution, recognize objective C methods only if we are in a declaration
scope.
llvm-svn: 177740
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int a; // not formatted
// formatting this line only
After:
int a; // not formatted
// formatting this line only
This makes clang-format stable independent of whether the whole
file or single lines are formatted in most cases.
llvm-svn: 177739
|
| |
|
|
|
|
| |
As the comment says, it's a little silly to cache it in the ABI code.
llvm-svn: 177738
|
| |
|
|
|
|
|
|
|
| |
Otherwise, +/- and the beginning of constants can be recognized
incorrectly.
Before: #define A - 1
After: #define A -1
llvm-svn: 177725
|
| |
|
|
| |
llvm-svn: 177721
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently one needs to set LangOptions.LineComment.
Before "//* */" got reformatted to "/ /* */" as the lexer was returning
the token sequence (slash, comment). This could also lead to weird other
stuff, e.g. for people that like to using comments like:
//****************
llvm-svn: 177720
|
| |
|
|
| |
llvm-svn: 177705
|
| |
|
|
|
|
|
|
| |
hierarchy-related at a possibly nonzero offset.
Patch by Alexander Zinenko!
llvm-svn: 177698
|
| |
|
|
|
|
|
|
|
|
|
|
| |
picking up cleanups from earlier in the statement. Also fix a
crash-on-invalid where a reference to an invalid decl from an
enclosing scope was causing an expression to fail to build, but
only *after* a cleanup was registered from that statement,
causing an assertion downstream.
The crash-on-valid is rdar://13459289.
llvm-svn: 177692
|
| |
|
|
|
|
| |
value argument. If not, be sure we don't accidentally use a dynamic alloca.
llvm-svn: 177690
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers defining size_t/ptrdiff_t/wchar_t.
Clang's <stddef.h> provides definitions for the C standard library
types size_t, ptrdiff_t, and wchar_t. However, the system's C standard
library headers tend to provide the same typedefs, and the two
generally avoid each other using the macros
_SIZE_T/_PTRDIFF_T/_WCHAR_T. With modules, however, we need to see
*all* of the places where these types are defined, so provide the
typedefs (ignoring the macros) when modules are enabled.
llvm-svn: 177686
|
| |
|
|
|
|
|
|
|
|
| |
structure, so it's easier to find.
We now put the Clang module cache in
<system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day
there will be other caches under <system-temp-directory>/org.llvm.clang>.
llvm-svn: 177671
|
| |
|
|
| |
llvm-svn: 177665
|
| |
|
|
|
|
|
|
|
|
| |
is issused for on overriding 'readwrite'
property which is not auto-synthesized.
Buttom line is that if hueristics determine
that there will be a user implemented setter,
no warning will be issued. // rdar://13388503
llvm-svn: 177662
|
| |
|
|
| |
llvm-svn: 177657
|
| |
|
|
|
|
| |
covered switch.
llvm-svn: 177656
|
| |
|
|
|
|
| |
Debug utility only, no functionality change.
llvm-svn: 177649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
1. When splitting one-line block comment, use indentation and *s.
2. Remove trailing whitespace from all lines of a comment, not only the ones being splitted.
3. Add backslashes for all lines if a comment is used insed a preprocessor directive.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D557
llvm-svn: 177635
|
| |
|
|
|
|
| |
targeting the iOS simulator.
llvm-svn: 177633
|
| |
|
|
|
|
| |
of their subdirectory in the include path.
llvm-svn: 177621
|
| |
|
|
|
|
|
|
|
| |
enum return type to be converted to blocks with any integer type
of the same size.
rdar://13463504
llvm-svn: 177613
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
sanitizer runtime is present.
* libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
a C++ ABI library, and is always linked in.
* libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
C++ ABI library, and is only linked in when linking a C++ binary.
This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).
The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).
The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.
llvm-svn: 177605
|
| |
|
|
|
|
|
|
|
|
| |
Reviewers: rjmccall
CC: timurrrr, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D554
llvm-svn: 177589
|
| |
|
|
| |
llvm-svn: 177583
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Clarify what MacroInfo::isBuiltinMacro means, as it really means something
more like "isMagicalMacro" or "requiresProcessingBeforeExpansion" -- the
macros defined in "<built-in>" are not considered built-in by this function;
* Escape __LINE__ as \__LINE__ in Doxygen comments so that the underscores
don't get replaced by *bold* output;
* Turn comments in MacroInfo.cpp into non-Doxygen comments, so that they
don't result in duplicated/badly formatted Doxygen output;
* Clean up a bunch of \brief formatting, and add a \file comment for
MacroInfo.h.
llvm-svn: 177581
|
| |
|
|
|
|
| |
and warn when a newly-imported module conflicts with an already-imported module.
llvm-svn: 177577
|