Also, it was the only reason that `argc` and `argv` were being passed
into createDiagnostics, so remove those parameters and clean up callers.
llvm-svn: 172945
This looks like it was copied from SetUpBuildDumpLog, which dumps to the
file `DiagOpts->DumpBuildInformation`. There is another member
`DiagOpts->DiagnosticLogFile` which appears to be unused. The fact that
this feature doesn't even print to the output file specified on the
command line makes me think that it should be ripped out.
llvm-svn: 172944
Before:
Calling implicit default constructor for 'Foo' (where Foo is constructed)
Entered call from 'test' (at "=default" or 'Foo' declaration)
Calling default constructor for 'Bar' (at "=default" or 'Foo' declaration)
After:
Calling implicit default constructor for 'Foo' (where Foo is constructed)
Calling default constructor for 'Bar' (at "=default" or 'Foo' declaration)
This only affects the plist diagnostics; this note is never shown in the
other diagnostics.
llvm-svn: 172915
Adding the pseudo first parameter to a member function pointer's function type
and mark it as artificial.
Combined with a fix to GDB ( http://sourceware.org/bugzilla/show_bug.cgi?id=14998 )
this fixes gdb.cp/member-ptr.exp with Clang.
llvm-svn: 172911
Most of the CompletionChunks represent braces, colons or other one
character spellings. There is no need to call libclang, to figure out
how to write a colon. Instead we use an internal cache to retrieve the
correct spelling. As function calls from python are very expensive and
this is a performance critical part of auto completion this patch makes
formatting of auto completion results a lot faster.
Formatting time changes from 0.57 to 0.45 seconds
llvm-svn: 172901
This is a very performance critical point for auto completion. The manual
implementation gives a large speedup. As it does not complicate the code a lot,
I figured it is worth the change. If anybody understands why the CachedProperty
is here so much slower, I am very interested in working on an improvement of
CachedProperty.
Formatting time changes from 0.72 to 0.57 seconds.
llvm-svn: 172900
We can directly the number of the kind instead of going through the
completionChunkKindMap.
Formatting time changes from 0.84 to 0.72 seconds.
llvm-svn: 172899
Manually fix the order of UnwrappedLineParser.cpp as that one didn't
have its associated header as the first header.
This also uncovered a subtle inclusion order dependency as CLog.h didn't
include LLVM.h to pick up using declarations it relied upon.
llvm-svn: 172892
Suppress the warning by just not emitting the report. The sink node
would get generated, which is fine since we did reach a bad state.
Motivation
Due to the way code is structured in some of these macros, we do not
reason correctly about it and report false positives. Specifically, the
following loop reports a use-after-free. Because of the way the code is
structured inside of the macro, the analyzer assumes that the list can
have cycles, so you end up with use-after-free in the loop, that is
safely deleting elements of the list. (The user does not have a way to
teach the analyzer about shape of data structures.)
SLIST_FOREACH_SAFE(item, &ctx->example_list, example_le, tmpitem) {
if (item->index == 3) { // if you remove each time, no complaints
assert((&ctx->example_list)->slh_first == item);
SLIST_REMOVE(&ctx->example_list, item, example_s, example_le);
free(item);
}
}
llvm-svn: 172883
The warning is still under -Wuninitialized (although technically this
is defined behavior), but under a subgroup -Wstatic-self-init.
This addresses PR 10265.
llvm-svn: 172878
partially-substituted parameter pack in a template, forget about the
partially-substituted parameter pack: it is now completed. Fixes
<rdar://problem/12176336>.
llvm-svn: 172859
Makes sure that a deserialized macro is only added to the preprocessor macro definitions only once.
Unfortunately I couldn't get a reduced test case.
rdar://13016031
llvm-svn: 172843
r159549 / r159164 regressed clang to reject
struct s {};
struct s
operator++(struct s a)
{ return a; }
This fixes the regression. Richard, pleas check if this looks right.
llvm-svn: 172834