| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Each toolchain has a set of tools, but they are all of known types. It can
have a linker, an assembler, a "clang" (compile, analyze, ...) a non-clang
compiler, etc.
Instead of keeping a map, just have member variable for each type of tool.
llvm-svn: 177479
|
| |
|
|
|
|
|
|
|
|
| |
emit function names in .gcda files by default, and the flag turns that off!
Rename the flag to make it match what it actually does. This keeps the default
format compatible with gcc 4.2.
Also add a test for this flag.
llvm-svn: 177475
|
| |
|
|
|
|
|
|
| |
performing unqualified lookup for a friend class declaration.
rdar://13393749
llvm-svn: 177473
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This code was changed in r158376 to get template argument source info
for better diagnostics, but the current code asserts for any kind of
unsupported template argument before it can issue a diagnostic. This change
goes back to the Itanium implementation of isTemplate() and puts the argument
index into the diagnostic instead of a source location.
Review URL: http://llvm-reviews.chandlerc.com/D553
llvm-svn: 177471
|
| |
|
|
|
|
|
| |
is enabled. Also add a new -test-coverage cc1 flag which makes testing coverage
possible and add our first clang-side coverage test.
llvm-svn: 177470
|
| |
|
|
|
|
|
|
|
|
| |
With the assurance that the trimmed graph does not contain cycles,
this patch is safe (with a few tweaks), and provides the performance
boost it was intended to.
Part of performance work for <rdar://problem/13433687>.
llvm-svn: 177469
|
| |
|
|
|
|
|
|
|
| |
Having a trimmed graph with no cycles (a DAG) is much more convenient for
trying to find shortest paths, which is exactly what BugReporter needs to do.
Part of the performance work for <rdar://problem/13433687>.
llvm-svn: 177468
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configuration macros are macros that are intended to alter how a
module works, such that we need to build different module variants
for different values of these macros. A module can declare its
configuration macros, in which case we will complain if the definition
of a configation macro on the command line (or lack thereof) differs
from the current preprocessor state at the point where the module is
imported. This should eliminate some surprises when enabling modules,
because "#define CONFIG_MACRO ..." followed by "#include
<module/header.h>" would silently ignore the CONFIG_MACRO setting. At
least it will no longer be silent about it.
Configuration macros are eventually intended to help reduce the number
of module variants that need to be built. When the list of
configuration macros for a module is exhaustive, we only need to
consider the settings for those macros when building/finding the
module, which can help isolate modules for various project-specific -D
flags that should never affect how modules are build (but currently do).
llvm-svn: 177466
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes a crash when analyzing LLVM that was exposed by r177220 (modeling of
trivial copy/move assignment operators).
When we look up a lazy binding for “Builder”, we see the direct binding of Loc at offset 0.
Previously, we believed the binding, which led to a crash. Now, we do not believe it as
the types do not match.
llvm-svn: 177453
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The whole reason we were doing a BFS in the first place is because an
ExplodedGraph can have cycles. Unfortunately, my removeErrorNode "update"
doesn't work at all if there are cycles.
I'd still like to be able to avoid doing the BFS every time, but I'll come
back to it later.
This reverts r177353 / 481fa5071c203bc8ba4f88d929780f8d0f8837ba.
llvm-svn: 177448
|
| |
|
|
|
|
|
|
|
| |
closing rbrace is missing in an ObjC class declaration.
Can do beter than this, but it involves addition of
overhead which will be present in correct code.
// rdar://6854840
llvm-svn: 177435
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
After:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
llvm-svn: 177420
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is implementation for /* */ comments only.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D547
llvm-svn: 177415
|
| |
|
|
| |
llvm-svn: 177402
|
| |
|
|
|
|
|
|
|
| |
If this should not happen, we should have an assert.
If it should happen, we should have a test and remove the comment.
In no case should we have this self inconsistent code.
llvm-svn: 177399
|
| |
|
|
|
|
| |
-no-integrated-as. It is the only assembler we have there.
llvm-svn: 177398
|
| |
|
|
| |
llvm-svn: 177391
|
| |
|
|
|
|
|
|
| |
we expect a related result type.
rdar://12493140
llvm-svn: 177378
|
| |
|
|
|
|
| |
out-of-date rather than missing.
llvm-svn: 177369
|
| |
|
|
|
|
|
|
|
| |
The general pattern now is that Foobar::constructTool only creates tools
defined in the tools::foobar namespace and then delegates to the parent.
The remaining duplicated code is now in the tools themselves.
llvm-svn: 177368
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the global module index.
The global module index was querying the file manager for each of the
module files it knows about at load time, to prune out any out-of-date
information. The file manager would then cache the results of the
stat() falls used to find that module file.
Later, the same translation unit could end up trying to import one of the
module files that had previously been ignored by the module cache, but
after some other Clang instance rebuilt the module file to bring it
up-to-date. The stale stat() results in the file manager would
trigger a second rebuild of the already-up-to-date module, causing
failures down the line.
The global module index now lazily resolves its module file references
to actual AST reader module files only after the module file has been
loaded, eliminating the stat-caching race. Moreover, the AST reader
can communicate to its caller that a module file is missing (rather
than simply being out-of-date), allowing us to simplify the
module-loading logic and allowing the compiler to recover if a
dependent module file ends up getting deleted.
llvm-svn: 177367
|
| |
|
|
|
|
|
|
| |
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.
llvm-svn: 177362
|
| |
|
|
| |
llvm-svn: 177360
|
| |
|
|
|
|
|
|
| |
top-level HeaderDoc tags @functiongroup and
@methodgroup to doc. tags recognized.
// rdar://12379114
llvm-svn: 177358
|
| |
|
|
| |
llvm-svn: 177354
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Splitting the graph trimming and the path-finding (r177216) already
recovered quite a bit of performance lost to increased suppression.
We can still do better by also performing the reverse BFS up front
(needed for shortest-path-finding) and only walking the shortest path
for each report. This does mean we have to walk back up the path and
invalidate all the BFS numbers if the report turns out to be invalid,
but it's probably still faster than redoing the full BFS every time.
More performance work for <rdar://problem/13433687>
llvm-svn: 177353
|
| |
|
|
|
|
|
|
| |
Also, replace a std::string with a SmallString.
No functionality change.
llvm-svn: 177352
|
| |
|
|
|
|
|
| |
The previous implementation missed the case where the elif condition was
evaluated from the context of an #ifdef that was false causing PR15539.
llvm-svn: 177345
|
| |
|
|
|
|
|
| |
Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377
llvm-svn: 177336
|
| |
|
|
|
|
| |
definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.
llvm-svn: 177335
|
| |
|
|
|
|
|
| |
Report and suggested fix by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=13020
llvm-svn: 177330
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.
llvm-svn: 177329
|
| |
|
|
|
|
|
|
|
| |
reports, and implement implicit definition of inheriting constructors.
Remaining missing features: inheriting constructor templates, implicit
exception specifications for inheriting constructors, inheriting constructors
from dependent bases.
llvm-svn: 177320
|
| |
|
|
| |
llvm-svn: 177319
|
| |
|
|
| |
llvm-svn: 177318
|
| |
|
|
|
|
|
|
| |
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://13138170
llvm-svn: 177311
|
| |
|
|
|
|
| |
delegating to Generic_GCC::SelectTool (it already updates the tool map).
llvm-svn: 177305
|
| |
|
|
| |
llvm-svn: 177303
|
| |
|
|
|
|
| |
argument.
llvm-svn: 177301
|
| |
|
|
|
|
| |
useIntegratedAs.
llvm-svn: 177300
|
| |
|
|
| |
llvm-svn: 177299
|
| |
|
|
| |
llvm-svn: 177293
|
| |
|
|
| |
llvm-svn: 177287
|
| |
|
|
|
|
|
|
| |
When annotating "lines" starting with ":", clang-format would segfault.
This could actually happen in valid code, e.g.
#define A :
llvm-svn: 177283
|
| |
|
|
|
|
| |
Patch by Andrew Turner!
llvm-svn: 177252
|
| |
|
|
| |
llvm-svn: 177222
|
| |
|
|
|
|
|
|
|
|
|
|
| |
r175234 allowed the analyzer to model trivial copy/move constructors as
an aggregate bind. This commit extends that to trivial assignment
operators as well. Like the last commit, one of the motivating factors here
is not warning when the right-hand object is partially-initialized, which
can have legitimate uses.
<rdar://problem/13405162>
llvm-svn: 177220
|
| |
|
|
|
|
|
| |
Thanks to Richard S. for pointing out that the warning would show up
with -Weverything.
llvm-svn: 177218
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we generate a path diagnostic for a bug report, we have to take the
full ExplodedGraph and limit it down to a single path. We do this in two
steps: "trimming", which limits the graph to all the paths that lead to
this particular bug, and "creating the report graph", which finds the
shortest path in the trimmed path to any error node.
With BugReporterVisitor false positive suppression, this becomes more
expensive: it's possible for some paths through the trimmed graph to be
invalid (i.e. likely false positives) but others to be valid. Therefore
we have to run the visitors over each path in the graph until we find one
that is valid, or until we've ruled them all out. This can become quite
expensive.
This commit separates out graph trimming from creating the report graph,
performing the first only once per bug equivalence class and the second
once per bug report. It also cleans up that portion of the code by
introducing some wrapper classes.
This seems to recover most of the performance regression described in my
last commit.
<rdar://problem/13433687>
llvm-svn: 177216
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...in favor of this typedef:
typedef llvm::DenseMap<const ExplodedNode *, const ExplodedNode *>
InterExplodedGraphMap;
Use this everywhere the previous class and typedef were used.
Took the opportunity to ArrayRef-ize ExplodedGraph::trim while I'm at it.
No functionality change.
llvm-svn: 177215
|