performing the search for overridden methods. We very rarely see the
same container twice, and in those rare cases we still have the
fallback of the second SmallPtrSet to eliminate duplicates. Good for
~1.5% -fsyntax-only speedup on the code in <rdar://problem/11004361>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156103 91177308-0d34-0410-b5e6-96231b3b80d8
Some of the NSAssert macros in OS X 10.7 are implemented in a way that
adds extra arguments that trigger the -Wformat-extra-args warning.
Earlier versions of clang failed to detect those -Wformat issues, but now
that clang is reporting those problems, we need to quiet them since there's
nothing to be done to fix them. <rdar://problem/11317765>
I don't know how to write a testcase for this. Suggestions welcome.
Patch by Ted Kremenek!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156092 91177308-0d34-0410-b5e6-96231b3b80d8
cases in switch statements. Also add a [[clang::fallthrough]] attribute, which
can be used to suppress the warning in the case of intentional fallthrough.
Patch by Alexander Kornienko!
The handling of C++11 attribute namespaces in this patch is temporary, and will
be replaced with a cleaner mechanism in a subsequent patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156086 91177308-0d34-0410-b5e6-96231b3b80d8
specifically checks for equality to null.
Enforcing this general practice, which keeps the analyzer less
noisy, in the CString Checker. This change suppresses "Assigned value is
garbage or undefined" warning in the added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156085 91177308-0d34-0410-b5e6-96231b3b80d8
We need to identify the value of ptr as
ElementRegion (result of pointer arithmetic) in the following code.
However, before this commit '(2-x)' evaluated to Unknown value, and as
the result, 'p + (2-x)' evaluated to Unknown value as well.
int *p = malloc(sizeof(int));
ptr = p + (2-x);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156052 91177308-0d34-0410-b5e6-96231b3b80d8
The resulting type info is stored in the SymSymExpr, so no reason not to
support construction of expression with different subexpression types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156051 91177308-0d34-0410-b5e6-96231b3b80d8
The change resulted in multiple issues on the buildbot, so it's not
ready for prime time. Only enable history tracking for tainted
data(which is experimental) for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156049 91177308-0d34-0410-b5e6-96231b3b80d8
x86_64-arguments.cpp test file and be sure to test the coerced
case as well. Thanks to Wei-Ren Chen for bringing this test
to my attention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156047 91177308-0d34-0410-b5e6-96231b3b80d8
#define TEST int y; int x = y;
void foo() {
TEST
}
-Wuninitialized gives this warning:
invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here
[-Wuninitialized]
TEST
^~~~
invalid-loc.cc:2:29: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
note: initialize the variable 'y' to silence this warning
1 warning generated.
The second note lacks filename, line number, and code snippet. This change
will remove the fixit and only point to variable declaration.
invalid-loc.cc:4:3: warning: variable 'y' is uninitialized when used here
[-Wuninitialized]
TEST
^~~~
invalid-loc.cc:2:29: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
invalid-loc.cc:4:3: note: variable 'y' is declared here
TEST
^
invalid-loc.cc:2:14: note: expanded from macro 'TEST'
#define TEST int y; int x = y;
^
1 warning generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156045 91177308-0d34-0410-b5e6-96231b3b80d8
not as we expect; it may be due to racing issue of a file coming from PCH
changing after the PCH is loaded.
rdar://11353109
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156043 91177308-0d34-0410-b5e6-96231b3b80d8
refactorings in that revision, and some of the subsequent bugfixes, which
seem to be relevant even without delayed exception specification parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156031 91177308-0d34-0410-b5e6-96231b3b80d8
related to laying out ivar structs and accessing non-fragile-ivar
in more compilated cases. // rdar://11323187
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156004 91177308-0d34-0410-b5e6-96231b3b80d8
TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only
time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me
at StringMatcher!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156003 91177308-0d34-0410-b5e6-96231b3b80d8
Without the '<' prefix in the doxycomment these comments were incorrectly
attached to the proceeding comment on the next line, rather than the
preceeding one.
Fixes PR12722
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155993 91177308-0d34-0410-b5e6-96231b3b80d8