]>
granicus.if.org Git - clang/log
Jordy Rose [Tue, 23 Aug 2011 20:27:16 +0000 (20:27 +0000)]
[analyzer] Move helper method Update from CFRefCount to RetainReleaseChecker. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138370
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Aug 2011 20:22:34 +0000 (20:22 +0000)]
Cleanup to use helper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138369
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 23 Aug 2011 20:17:13 +0000 (20:17 +0000)]
Remove function parameter which always used the default value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 23 Aug 2011 20:07:14 +0000 (20:07 +0000)]
[analyzer] Move helper method handleAutoreleaseCounts from CFRefCount to RetainReleaseChecker. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 23 Aug 2011 19:43:16 +0000 (19:43 +0000)]
[analyzer] Move ReturnStmt retain-count analysis from CFRefCount to RetainReleaseChecker. Tweak CFRefReport to reflect that fact that ReturnStmt checks are pre-statement, not post-statement. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 23 Aug 2011 19:01:07 +0000 (19:01 +0000)]
[analyzer] Move symbol death leak analysis from CFRefCount to RetainReleaseChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Caitlin Sadowski [Tue, 23 Aug 2011 18:46:34 +0000 (18:46 +0000)]
Thread-safety analysis: adding in a basic lockset tracking system. This
system flags an error when unlocking a lock which was not held, locking
the same lock twice, having a different lockset on each iteration of a
loop, or going out of scope while still holding a lock. In order to
successfully use the lockset, this patch also makes sure that attribute
arguments are attached correctly for later parsing.
This patch was also worked on by DeLesley Hutchins.
Note: This patch has been reviewed by Chandler Carruth and Jeffrey
Yasskin. Feel free to provide post-commit review comments for a
subsequent patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 23 Aug 2011 17:56:55 +0000 (17:56 +0000)]
Add support for a verifier to the driver. Currently only verifies debug
output on darwin so is hard coded there.
As a note this will need a little bit of refactoring in the class
hierarchy to separate it out for different verifiers based on input type.
Fixes rdar://
8256258 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Aug 2011 16:47:15 +0000 (16:47 +0000)]
checking for __block variable captured by given
stmt expression, recursively walk down all substatements
of the stmt expression. // rdar://
10001085
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 23 Aug 2011 07:38:27 +0000 (07:38 +0000)]
enable -fstack-protector on 10.5 for usermode binaries by default.
This matches gcc's behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 23 Aug 2011 04:27:15 +0000 (04:27 +0000)]
[analyzer] Only allocate retain summaries for interesting functions/messages. This is a minor saving of memory but doesn't seem to cost any performance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 23 Aug 2011 01:35:51 +0000 (01:35 +0000)]
Fix an incorrect note.
For the test case added to function-redecl.cpp, we were previously complaining
about a mismatch in the parameter types, since the definition used the
typedef'd type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Aug 2011 00:27:49 +0000 (00:27 +0000)]
block IRgen - Fixes a crash when determining if given block variable
is captured by a given statement expression. // rdar://
10001085
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Tue, 23 Aug 2011 00:03:01 +0000 (00:03 +0000)]
[analyzer] Rename CFRefCount's evalSummary method to evalCallOrMessage, since it no longer, uh, evaluates call summaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 22 Aug 2011 23:55:33 +0000 (23:55 +0000)]
Make sure we don't inline functions marked with __attribute__((naked)). <rdar://problem/
9973228 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 22 Aug 2011 23:48:23 +0000 (23:48 +0000)]
[analyzer] Migrate the handling of retain-count-related RetEffects and ArgEffects from CFRefCount to RetainReleaseChecker. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 22 Aug 2011 23:18:12 +0000 (23:18 +0000)]
[analyzer] MacOSKeychainAPIChecker: Users of KeyChain API often use free() to deallocate the password. Catch this error explicitly and generate the error message at the place where free() is called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 21:44:58 +0000 (21:44 +0000)]
objc refactoring - minor clean up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 22 Aug 2011 20:31:28 +0000 (20:31 +0000)]
Static Analyzer Diagnostics: Allow checkers to add ExtraDescriptiveText, now renamed into ExtraText, to the diagnostic without subclassing BugReport.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138272
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 20:15:24 +0000 (20:15 +0000)]
objc - use existing API for temporary switch of
objc's decl context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 22 Aug 2011 19:07:43 +0000 (19:07 +0000)]
Do not perform check for missing '[super dealloc]' under ARC as calling -dealloc is illegal in that mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Mon, 22 Aug 2011 18:54:07 +0000 (18:54 +0000)]
Clean up the CFRefBugReport - remove the members, which got moved to the CFRefReportVisitors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 22 Aug 2011 18:48:28 +0000 (18:48 +0000)]
Don't warn on varaidic macros in C++0x mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 18:34:22 +0000 (18:34 +0000)]
objc - minor comment fix up and cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 17:59:19 +0000 (17:59 +0000)]
objc - Simplify switing objc decl context by using
a context switching object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138248
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 22 Aug 2011 17:25:57 +0000 (17:25 +0000)]
Warn on missing [super dealloc] calls.
This matches gcc's logic. Half of PR10661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 22 Aug 2011 17:24:56 +0000 (17:24 +0000)]
Fix a crash-on-valid that has been here for a very long time:
const int &x = x;
This crashed by inifinetly recursing within the lvalue evaluation
routine. I've added a (somewhat) braindead way of preventing this
recursion. If folks have better suggestions for how to avoid it I'm all
ears.
That said, we have some work to do. This doesn't trigger a single
warning for uninitialized, self-initialized or otherwise completely
wrong code. In some senses, the crash was almost better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138239
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 17:13:51 +0000 (17:13 +0000)]
objc- checking for objc decl context range is unreliable and
subject to change. Check for equality instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 22 Aug 2011 16:03:14 +0000 (16:03 +0000)]
Fix a bug in objc @encoding of C++ classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Aug 2011 15:54:49 +0000 (15:54 +0000)]
Restore patch I reversed in r138040. Known buildbot
failures are resolved.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 22 Aug 2011 02:05:13 +0000 (02:05 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 21 Aug 2011 23:49:52 +0000 (23:49 +0000)]
Fix gcc build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 21 Aug 2011 23:33:04 +0000 (23:33 +0000)]
Boost the efficiency of SourceManager::getMacroArgExpandedLocation.
Currently getMacroArgExpandedLocation is very inefficient and for the case
of a location pointing at the main file it will end up checking almost all of
the SLocEntries. Make it faster:
-Use a map of macro argument chunks to their expanded source location. The map
is for a single source file, it's stored in the file's ContentCache and lazily
computed, like the source lines cache.
-In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track
of the number of FileIDs (files and macros) that were created during preprocessing
of that particular file SLocEntry. This is useful when computing the macro argument
map in skipping included files while scanning for macro arg FileIDs that lexed from
a specific source file. Due to padding, the new field does not increase the size
of SLocEntry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138225
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 21 Aug 2011 21:58:18 +0000 (21:58 +0000)]
[analyzer] Migrate the aliasing effects of CFRetain and CFMakeCollectable from CFRefCount to RetainReleaseChecker. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 21 Aug 2011 21:04:38 +0000 (21:04 +0000)]
[analyzer] Remove FIXME; Ted reminded me that -init is not guaranteed to return its receiver and pretending that it does won't actually buy us anything. (Comment change only.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 21 Aug 2011 19:41:36 +0000 (19:41 +0000)]
[analyzer] Migrate return value handling from CFRefCount to ExprEngine. This seems to result in a minor performance hit, but I think that will go away again once we eliminate TransferFuncs from function calls entirely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138220
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 21 Aug 2011 05:25:15 +0000 (05:25 +0000)]
[analyzer] Replace calls to getNameAsString() with StringRef equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 20 Aug 2011 21:50:41 +0000 (21:50 +0000)]
Fix compile on platforms that don't implicitly include stdarg.h here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sat, 20 Aug 2011 21:17:59 +0000 (21:17 +0000)]
[analyzer] RetainReleaseChecker always wants region change updates. There's no need for a flag, at least not right now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sat, 20 Aug 2011 21:16:58 +0000 (21:16 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sat, 20 Aug 2011 20:55:40 +0000 (20:55 +0000)]
[analyzer] Move handling of hardcoded noreturn ("panic") methods from CFRefCount to NoReturnFunctionChecker. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138210
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 20 Aug 2011 07:09:20 +0000 (07:09 +0000)]
test/lit.cfg: Enable "crash-recovery" tests on Win32 hosts. CrashRecoveryContext supports Win32 since r138199.
FIXME: Shall we eliminate the feature "crash-recovery"?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138201
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sat, 20 Aug 2011 06:56:17 +0000 (06:56 +0000)]
Typo spotted by Ivan Krasin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 20 Aug 2011 06:30:57 +0000 (06:30 +0000)]
Remove this test. It requires C++ standard library headers, which we'd
like to avoid within the Clang test suite, it doesn't verify the output
at all so it only servers as a test that Clang doesn't crash, and
finally all it does is declare a function that returns a vector and call
it. Probably the biggest thing being tested here is Clang's parsing of
the vector template, and we have lots of good template parsing tests. We
don't need another in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Aug 2011 06:23:25 +0000 (06:23 +0000)]
[analyzer] Handle reads of ObjCPropertyRefExprs implicitly in Environment. No need to bind an explicit value and create a new node.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Aug 2011 06:16:31 +0000 (06:16 +0000)]
[analyzer] Simplify ExprEngine::VisitBinaryOperator() by removing recursive visit to subexpressions (which is no longer needed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Aug 2011 06:00:03 +0000 (06:00 +0000)]
Start partitioning ExprEngine.cpp into separate .cpp files that handle different parts
of the analysis (e.g., analysis of C expressions, analysis of Objective-C expressions, and so on).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Aug 2011 05:59:58 +0000 (05:59 +0000)]
Rename CXXExprEngine.cpp to ExprEngineCXX.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138193
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 20 Aug 2011 05:38:29 +0000 (05:38 +0000)]
test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp: Mark XFAIL: win32.
FIXME: Avoid using system headers. clang cannot handle MS <vector> yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 20 Aug 2011 05:09:43 +0000 (05:09 +0000)]
Make the loading of multiple records for the same identifier (from
different modules) more robust. It already handled (simple) merges of
the set of declarations attached to that identifier, so add a test
case that shows us getting two different declarations for the same
identifier (one struct, one function) from different modules, and are
able to use both of them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138189
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 20 Aug 2011 04:58:43 +0000 (04:58 +0000)]
Clean out some minor cruft in the AST reader; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 20 Aug 2011 04:39:52 +0000 (04:39 +0000)]
Introduce a module visitation function that starts at the top-level
modules (those that no other module depends on) and performs a search
over all of the modules, visiting a new module only when all of the
modules that depend on it have already been visited. The visitor can
abort the search for all modules that a module depends on, which
allows us to minimize the number of lookups necessary when performing
a search.
Switch identifier lookup from a linear walk over the set of modules to
this module visitation operation. The behavior is the same for simple
PCH and chained PCH, but provides the proper search order for
modules. Verified with printf debugging, since we don't have enough in
place to actually test this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138187
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Sat, 20 Aug 2011 01:27:22 +0000 (01:27 +0000)]
Static Analyzer Diagnostics: Move the responsibility for generating the endOfPath diagnostic piece from BugReport to BugReporterVisitor. Switch CFRefCount to use visitors in order to generate the endOfPath piece.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 20 Aug 2011 01:15:28 +0000 (01:15 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 01:08:46 +0000 (01:08 +0000)]
Remove XFAIL/XTARGET since this is passing on the other bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 01:04:49 +0000 (01:04 +0000)]
Migrate, update and FileCheckize:
2010-02-01-utf16-with-null.m
2010-02-23-DbgInheritance.m
2010-03-17-StructRef.m
2011-03-08-IVarLookup.m
from llvm/test/FrontendObjC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:49:25 +0000 (00:49 +0000)]
Migrate, update and FileCheckize:
2008-11-25-Blocks.m
2009-01-26-WriteBarrier-2.m
2009-02-05-VolatileProp.m
2009-08-05-utf16.m
from llvm/test/FrontendObjC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:37:56 +0000 (00:37 +0000)]
Migrate, FileCheckize and update:
2007-04-03-ObjcEH.m
2007-05-02-Strong.m
2007-10-18-ProDescriptor.m
2007-10-23-GC-WriteBarrier.m
2008-10-3-EhValue.m
2008-11-12-Metadata.m
2008-11-24-ConstCFStrings.m
from llvm/test/FrontendObjC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:25:36 +0000 (00:25 +0000)]
Migrate and update:
2007-10-03-MetadataPointers.mm
2010-08-04-Template.mm
2010-08-06-X.Y-syntax.mm
from llvm/test/FrontendObjC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:22:40 +0000 (00:22 +0000)]
Remove this file, it's not much of a test and string headers cause
problems on windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:17:18 +0000 (00:17 +0000)]
Migrate, FileCheckize and update:
2003-11-02-WeakLinkage.cpp
2003-11-18-PtrMemConstantInitializer.cpp
2003-11-25-ReturningOpaqueByValue.cpp
2003-11-27-MultipleInheritanceThunk.cpp
2003-11-29-DuplicatedCleanupTest.cpp
2003-12-08-ArrayOfPtrToMemberFunc.cpp
2004-01-11-DynamicInitializedConstant.cpp
from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 20 Aug 2011 00:09:39 +0000 (00:09 +0000)]
Migrate, FileCheckize and update:
2004-03-08-ReinterpretCastCopy.cpp
2004-03-09-UnmangledBuiltinMethods.cpp
2004-03-15-CleanupsAndGotos.cpp
2004-06-08-LateTemplateInstantiation.cpp
2004-09-27-CompilerCrash.cpp
2004-09-27-DidntEmitTemplate.cpp
2004-11-27-ExceptionCleanupAssertion.cpp
2004-11-27-FriendDefaultArgCrash.cpp
2005-01-03-StaticInitializers.cpp
from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:46:18 +0000 (23:46 +0000)]
Modify the check line to be happier on windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:45:03 +0000 (23:45 +0000)]
Remove dead file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:41:35 +0000 (23:41 +0000)]
Migrate, FileCheckize and update:
2005-02-11-AnonymousUnion.cpp
2005-02-13-BadDynamicInit.cpp
2005-02-14-BitFieldOffset.cpp
2005-02-19-BitfieldStructCrash.cpp
2005-02-19-UnnamedVirtualThunkArgument.cpp
2005-02-20-BrokenReferenceTest.cpp
2006-03-01-GimplifyCrash.cpp
2006-03-06-C++RecurseCrash.cpp
2006-09-12-OpaqueStructCrash.cpp
2006-10-30-ClassBitfield.cpp
2006-11-20-GlobalSymbols.cpp
2006-11-20-GlobalSymbols.ll
2006-11-30-ConstantExprCrash.cpp
from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 19 Aug 2011 23:26:54 +0000 (23:26 +0000)]
Add new test.
Remove one outdated test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138144
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 19 Aug 2011 23:21:56 +0000 (23:21 +0000)]
Static Analyzer Diagnostics: Switch CFRefCount to using the new visitor API. BugReport no longer needs to inherit from BugReporterVisitor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:17:46 +0000 (23:17 +0000)]
Try removing xfail and xtarget to see if this brings back a couple of bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:15:04 +0000 (23:15 +0000)]
Migrate 2007-01-02-UnboundedArray.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 23:08:33 +0000 (23:08 +0000)]
Migrate:
2007-01-06-PtrMethodInit.cpp
2007-04-05-PackedBitFields-1.cpp
2007-04-05-PackedBitFieldsOverlap-2.cpp
2007-04-05-PackedBitFieldsOverlap.cpp
2007-04-05-PackedBitFieldsSmall.cpp
2007-04-05-StructPackedFieldUnpacked.cpp
2007-04-10-PackedUnion.cpp
2007-04-14-FNoBuiltin.cpp
2007-05-03-VectorInit.cpp
2007-07-29-RestrictPtrArg.cpp
2007-07-29-RestrictRefArg.cpp
2007-09-10-RecursiveTypeResolution.cpp
from llvm/test/FrontendC++ and FileCheckize where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 19 Aug 2011 22:34:17 +0000 (22:34 +0000)]
For assigning SourceLocations to macro arg tokens, reserve a single SLocEntry
for tokens that are lexed consecutively from the same FileID, instead of creating
a SLocEntry for each token. e.g for
assert(foo == bar);
there will be a single SLocEntry for the "foo == bar" chunk and locations
for the 'foo', '==', 'bar' tokens will point inside that chunk.
For parsing SemaExpr.cpp, this reduced the number of SLocEntries by 25%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 19 Aug 2011 22:34:14 +0000 (22:34 +0000)]
Rename TokenLexer::getMacroExpansionLocation -> getExpansionLocForMacroDefLoc, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 19 Aug 2011 22:34:01 +0000 (22:34 +0000)]
Refactor common functionality into SourceManager::getFileIDSize, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 19 Aug 2011 22:33:38 +0000 (22:33 +0000)]
Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*).
1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well.
2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor.
3) Modify all the checkers to use the new API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:25:04 +0000 (22:25 +0000)]
Remove 2008-10-29-WrongOffset.cpp since it requires a header file on all
platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:25:02 +0000 (22:25 +0000)]
Migrate 2007-10-01-StructResize.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:16:30 +0000 (22:16 +0000)]
Migrate 2008-01-12-VecInit.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:16:28 +0000 (22:16 +0000)]
Migrate 2008-05-07-CrazyOffsetOf.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:16:25 +0000 (22:16 +0000)]
Migrate 2008-10-29-WrongOffset.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:16:23 +0000 (22:16 +0000)]
Migrate 2009-03-17-dbg.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:16:21 +0000 (22:16 +0000)]
Migrate 2009-04-23-bool2.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 22:00:44 +0000 (22:00 +0000)]
Remove this test. It's failing and it's not that good of a test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:51:07 +0000 (21:51 +0000)]
Migrate 2009-06-16-DebugInfoCrash.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:51:05 +0000 (21:51 +0000)]
Migrate 2009-07-16-PrivateCopyConstructor.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:51:03 +0000 (21:51 +0000)]
Migrate 2009-08-05-ZeroInitWidth.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:51:01 +0000 (21:51 +0000)]
Migrate 2009-07-16-Using.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:50:59 +0000 (21:50 +0000)]
Migrate 2009-08-11-VectorRetTy.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:24:41 +0000 (21:24 +0000)]
Migrate 2009-09-09-packed-layout.cpp test from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:24:39 +0000 (21:24 +0000)]
Migrate 2009-10-27-crash.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 19 Aug 2011 21:24:37 +0000 (21:24 +0000)]
Migrate 2009-12-23-MissingSext.cpp from test/FrontendC++ and modify
for sext -> and difference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 19 Aug 2011 21:20:08 +0000 (21:20 +0000)]
Remove another unused function from ModuleManager. We have no notion of a 'last' module any more
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 19 Aug 2011 21:12:29 +0000 (21:12 +0000)]
Remove unused function ModuleManager::exportLookup()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 19 Aug 2011 20:43:24 +0000 (20:43 +0000)]
Do not depend on the standard library on the system. Replace the #include with
the relevant section of libcxx.
As an aside, I am not at all confident that this test is still testing that it's
supposed to.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Fri, 19 Aug 2011 20:40:18 +0000 (20:40 +0000)]
Improve the correctness and accuracy of the message for -Wdynamic-class-memaccess
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 19 Aug 2011 19:28:44 +0000 (19:28 +0000)]
objc-arc: @property definitions should default to (strong) when not
specified. // rdar://
9971982
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 19 Aug 2011 18:02:47 +0000 (18:02 +0000)]
Revers r138040. Need to look at a few buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 19 Aug 2011 16:06:57 +0000 (16:06 +0000)]
objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 19 Aug 2011 14:35:32 +0000 (14:35 +0000)]
Rename -Wstrl-incorrect-size to -Wstrlcpy-strlcat-size. This warning really is just specific to strlcpy and strlcat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 19 Aug 2011 04:18:11 +0000 (04:18 +0000)]
Reflow code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 19 Aug 2011 03:20:12 +0000 (03:20 +0000)]
Warn about and truncate UCNs that are too big for their character literal type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138031
91177308 -0d34-0410-b5e6-
96231b3b80d8