]>
granicus.if.org Git - clang/log
John McCall [Wed, 18 Aug 2010 19:18:59 +0000 (19:18 +0000)]
Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 18:43:17 +0000 (18:43 +0000)]
libclang: Put clang_parseTranslationUnit inside a crash recovery context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 18:43:14 +0000 (18:43 +0000)]
libclang: Implicitly enable crash recovery when using the libclang APIs. We may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 16:09:06 +0000 (16:09 +0000)]
zap dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 16:08:51 +0000 (16:08 +0000)]
no need to pass bumppointer allocator into macroinfo::destroy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 15:06:25 +0000 (15:06 +0000)]
Make sure to add MallocAttr to explicitly-declared operator new/new[]
when -fassume-sane-operator-new. Patch by Tom Jablin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 14:24:02 +0000 (14:24 +0000)]
Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 18 Aug 2010 09:58:15 +0000 (09:58 +0000)]
Flesh out the test cases a little.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111359
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 18 Aug 2010 09:41:07 +0000 (09:41 +0000)]
Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class. Also, look into templates when doing this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 18 Aug 2010 08:32:33 +0000 (08:32 +0000)]
Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.
This effectively disables -Wunused-member-function for building llvm/clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 18 Aug 2010 06:46:41 +0000 (06:46 +0000)]
Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 18 Aug 2010 04:33:47 +0000 (04:33 +0000)]
Remove dead malloc symbols from the symbol-state map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 18 Aug 2010 04:26:59 +0000 (04:26 +0000)]
Use RegionStateTy everywhere we mean ImmutableMap<SymbolRef, RefState>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 02:45:56 +0000 (02:45 +0000)]
zap dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 02:44:19 +0000 (02:44 +0000)]
zap a big dead method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 00:39:00 +0000 (00:39 +0000)]
Emit an error if an array is too large. We're slightly more strict
than GCC 4.2 here when building 32-bit (where GCC will allow
allocation of an array for which we can't get a valid past-the-end
pointer), and emulate its odd behavior in 64-bit where it only allows
63 bits worth of storage in the array. The former is a correctness
issue; the latter is harmless in practice (you wouldn't be able to use
such an array anyway) and helps us pass a GCC DejaGNU test.
Fixes <rdar://problem/
8212293 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 00:13:52 +0000 (00:13 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 00:08:27 +0000 (00:08 +0000)]
Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 23:58:10 +0000 (23:58 +0000)]
fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 23:51:30 +0000 (23:51 +0000)]
TypedRegion::isBoundable() should return true by default. Since there is no TypedViewRegion anyore, it is not possible that the subclass (which doesn't override isBoundable) could return a null value type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 23:50:37 +0000 (23:50 +0000)]
Get rid of extra nesting when checking for invalid type,
per Doug's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 23:29:06 +0000 (23:29 +0000)]
Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 23:19:16 +0000 (23:19 +0000)]
Diagnose if type of iboutletcollection attribute is a builtin type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 22:42:34 +0000 (22:42 +0000)]
Get rid of pretty non-ASCII quotes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:39:59 +0000 (22:39 +0000)]
StringRef'ication of lots stuff, patch by Peter Davies!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:32:48 +0000 (22:32 +0000)]
Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:32:45 +0000 (22:32 +0000)]
Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
reported as unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 17 Aug 2010 22:06:44 +0000 (22:06 +0000)]
Rename -Wunused-method -> -Wunused-member-function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 22:05:33 +0000 (22:05 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111304
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 21:51:21 +0000 (21:51 +0000)]
Whoops. Don't fall through into the overload case when mangling a
dependent call expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 17 Aug 2010 21:43:11 +0000 (21:43 +0000)]
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace.
This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed
and we are ready to turn it on. Suggestion by Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 21:39:27 +0000 (21:39 +0000)]
Diagnose use of iboutletcollection on ivar/property
of non-object types. Radar
8308053 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 21:27:17 +0000 (21:27 +0000)]
Implicit decl ref expressions might not have name locations; don't silently
fail to instantiate them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 21:00:23 +0000 (21:00 +0000)]
Fix CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111284
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 21:00:06 +0000 (21:00 +0000)]
Fix horrible CFG bug caused by a series of NullStmts appearing at the beginning of a do...while loop. This would cause
the body of the DoStmt to be disconnected from the preceding code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 20:59:56 +0000 (20:59 +0000)]
CFGBuilder: don't create the empty "loop back" block for DoStmts if the loop edge can never be taken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 20:43:28 +0000 (20:43 +0000)]
Reintroduce the serialization library, with fixed dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 20:23:12 +0000 (20:23 +0000)]
Patch to add type parameter support for attribute iboutletcollection.
Radar
8308053 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 19:00:27 +0000 (19:00 +0000)]
Remove the last bit of the Clang Serialization library, for now
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 18:31:01 +0000 (18:31 +0000)]
Revert Sebastian's build-breaking patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Aug 2010 18:07:30 +0000 (18:07 +0000)]
Add the clangSerialization library to libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 17:55:49 +0000 (17:55 +0000)]
Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 17:55:38 +0000 (17:55 +0000)]
Fix a typo in a diag name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 17:34:48 +0000 (17:34 +0000)]
Remove a gratuitous lie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 16:09:23 +0000 (16:09 +0000)]
A member function never has "C" linkage. Fixes <rdar://problem/
8318976 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 16:06:07 +0000 (16:06 +0000)]
When generating code completion patterns for method declarations, give
the resulting pattern the appropriate cursor kind of an instance or
class method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 16:02:32 +0000 (16:02 +0000)]
apparently msvc defines _STDCALL_SUPPORTED, so we should
too. Patch by Per Linden!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 16:00:12 +0000 (16:00 +0000)]
Add a slightly better hack for microsoft style inline asm,
patch by Per Linden!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 15:55:45 +0000 (15:55 +0000)]
Implement #pragma push_macro, patch by Francois Pichet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 15:53:35 +0000 (15:53 +0000)]
1 != I. Fix the formulation of code-completion patterns for
Objective-C method declarations with > 2 parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 17 Aug 2010 12:54:38 +0000 (12:54 +0000)]
Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 07:23:57 +0000 (07:23 +0000)]
Don't try to initialize a reference with a constructed temporary if either
of the classes is invalid. A class is invalid if a base is invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 00:40:40 +0000 (00:40 +0000)]
When the # of top-level declarations changes after reparsing a
translation unit, refresh code-completion results because they've
probably changed. However, enforce a cooldown period between
refreshes, to avoid thrashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111218
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 17 Aug 2010 00:36:37 +0000 (00:36 +0000)]
Generate a node instead of a sink. A leak is not a fatal error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111217
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 16 Aug 2010 23:42:35 +0000 (23:42 +0000)]
A field of incomplete type is sufficiently disruptive that we should mark
the record invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 16 Aug 2010 23:27:44 +0000 (23:27 +0000)]
Move a bunch of code out of the ComplexExprEvaluator class definition;
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 23:25:19 +0000 (23:25 +0000)]
Allow the "size" of a buffer access check to be either signed or unsigned. Fixes PR7925.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 23:08:34 +0000 (23:08 +0000)]
Move include to the proper place. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 23:05:20 +0000 (23:05 +0000)]
Implement support for cached code completions for
nested-name-specifiers. Also includes fixes to the generation of
nested-name-specifier result in the non-cached case; we were producing
lame results for namespaces and namespace aliases, which (1) didn't
always have nested-name-specifiers when we want them, and (2) did not
have the necessary "::" as part of the completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 16 Aug 2010 21:51:12 +0000 (21:51 +0000)]
Diagnose assiging to an interface object in
non-fragile abi mode as sizes are not statically known.
Fixes radar
8315734 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Mon, 16 Aug 2010 21:43:52 +0000 (21:43 +0000)]
Added basic psuedoconstant checking in IdempotentOperationChecker and fixed some test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 21:23:13 +0000 (21:23 +0000)]
Formatting fixes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 21:18:39 +0000 (21:18 +0000)]
Implement name hiding of cached global code-completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 20:53:01 +0000 (20:53 +0000)]
Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 20:34:06 +0000 (20:34 +0000)]
Move GRState::AssumeInBound out of its header file -- it's not really inline-friendly anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 20:01:48 +0000 (20:01 +0000)]
Move some code out-of-line which has long since grown too large to be
inlined. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 16 Aug 2010 18:17:11 +0000 (18:17 +0000)]
Add two options for playing with modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 18:08:11 +0000 (18:08 +0000)]
When caching code completions for global declarations, keep track of
the usage type of each declaration result, then compare those types to
the preferred type of the completion. This provides parity in the
priority calculation between the code-completion results produced
directly from Sema and those cached by ASTUnit.
For the standard Cocoa.h (+ others) example, there's a penalty of 3-4
hundredeths of a second when caching the global results (for ~31,000
results), because we need an ASTContext-agnostic representation of
types for the comparison, and therefore we use... strings. Eventually,
we'd like to implement a more efficient ASTContext-agnostic encoding
of types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 16 Aug 2010 17:58:53 +0000 (17:58 +0000)]
Fix a crash when parsing malformed out-of-line member function
definition. radar
8307865 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 16 Aug 2010 17:27:13 +0000 (17:27 +0000)]
Fix initialization for members of anonymous struct in a union.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111159
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 16 Aug 2010 17:27:08 +0000 (17:27 +0000)]
Emit diagnostic error when the field of an anonymous struct is non trivial.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 16:46:30 +0000 (16:46 +0000)]
Dereferencing NULL pointers is such poor form.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anton Yartsev [Mon, 16 Aug 2010 16:22:12 +0000 (16:22 +0000)]
support for vec_add, vec_adds, vec_and, vec_andc with bool arguments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 16:18:59 +0000 (16:18 +0000)]
When caching global completion results, keep track of the simplified
type class, so that we can adjust priorities appropriately when the
preferred type for the context and the actual type of the completion
are similar.
This gets us one step closer to parity of the cached completion
results with the non-cached completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Mon, 16 Aug 2010 15:57:05 +0000 (15:57 +0000)]
Fixed typo in conj, conjf, conjl signature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 07:51:42 +0000 (07:51 +0000)]
Model the effects of strcpy() and stpcpy() in CStringChecker. Other changes:
- Fix memcpy() and friends to actually invalidate the destination buffer.
- Emit a different message for out-of-bounds buffer accesses if the buffer is being written to.
- When conjuring symbols, let ValueManager figure out the type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 16 Aug 2010 05:30:44 +0000 (05:30 +0000)]
Error out if reinterpret_casting between member pointers of two different
sizes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 16 Aug 2010 04:01:50 +0000 (04:01 +0000)]
Err on incomplete class types in member pointers when compiling for the
Microsoft C++ ABI, for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Mon, 16 Aug 2010 03:33:14 +0000 (03:33 +0000)]
Implement support for member pointers under the Microsoft C++ ABI in the
AST library.
This also adds infrastructure for supporting multiple C++ ABIs in the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 01:15:17 +0000 (01:15 +0000)]
- Allow making ElementRegions with complex offsets (expressions or symbols) for the purpose of bounds-checking.
- Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path.
- Remove ConstraintManager::AssumeInBound.
- Teach RegionStore and FlatStore to ignore those regions for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111116
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sun, 15 Aug 2010 22:58:12 +0000 (22:58 +0000)]
Pass some things to the linker that gcc passes. -r is the only one of these that I'm sure about, but the others seem to be listed on FreeBSD by gcc -dumpspecs, so I hope they're right. Apparently -r is also not passed on GNU/Linux (and should be), but I can't see where the toolchain definition for this platform live.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Sun, 15 Aug 2010 22:19:33 +0000 (22:19 +0000)]
Move GRState's bind* methods out of its header file -- they're too big for inlining now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 20:53:20 +0000 (20:53 +0000)]
Call the base class in StmtProfiler::VisitOverloadExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Aug 2010 16:54:31 +0000 (16:54 +0000)]
Open AST/PCH files in binary mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 15 Aug 2010 16:47:39 +0000 (16:47 +0000)]
Make the FixItOptions object required instead of optional.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 15 Aug 2010 12:45:09 +0000 (12:45 +0000)]
StoreManager::RemoveDeadBindings() can take a Store instead of an entire GRState now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 10:17:39 +0000 (10:17 +0000)]
Remove ATTRIBUTE_UNUSED from the common pattern of disallowing copying.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 10:17:33 +0000 (10:17 +0000)]
Don't warn for the common pattern of disallowing copying:
class S {
S(const S&); // DO NOT IMPLEMENT
void operator=(const S&); // DO NOT IMPLEMENT
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 15 Aug 2010 10:08:38 +0000 (10:08 +0000)]
Remove redundant method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 15 Aug 2010 08:19:57 +0000 (08:19 +0000)]
Implement MallocChecker::EvalDeadSymbols() with the new API. This time we
iterate over symbols being tracked, instead of symbols being dead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 15 Aug 2010 06:18:01 +0000 (06:18 +0000)]
Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.
There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.
Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 15 Aug 2010 02:27:09 +0000 (02:27 +0000)]
Use Enumerators.data() instead of &Enumerators[0] to fix a potential
assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:58 +0000 (01:15 +0000)]
Remove dead code, caught by unused function warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:44 +0000 (01:15 +0000)]
DependentTypeOfExprType and DependentDecltypeType are not seen by client code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:38 +0000 (01:15 +0000)]
Call the correct base class in StmtProfiler::VisitUnresolvedLookupExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:33 +0000 (01:15 +0000)]
Some refactoring on StmtPrinter to avoid unused function warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:27 +0000 (01:15 +0000)]
Add ATTRIBUTE_UNUSED to methods not supposed to be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 15 Aug 2010 01:15:20 +0000 (01:15 +0000)]
Commit improved version of 111026 & 111027.
Unused warnings for functions:
-static functions
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace
Unused warnings for variables:
-static variables
-variables in anonymous namespace
-static data members in anonymous namespace
-static data members specializations in anonymous namespace
Reveals lots of opportunities for dead code removal in llvm codebase that will
interest my esteemed colleagues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 15 Aug 2010 00:24:31 +0000 (00:24 +0000)]
Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 14 Aug 2010 23:03:19 +0000 (23:03 +0000)]
Remember that FixItOptions* is optional and don't crash when it's not provided.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111084
91177308 -0d34-0410-b5e6-
96231b3b80d8