]>
granicus.if.org Git - clang/log
Douglas Gregor [Tue, 29 Sep 2009 03:26:11 +0000 (03:26 +0000)]
Add an input file that includes all standard C++ headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Sep 2009 03:13:20 +0000 (03:13 +0000)]
Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Sep 2009 03:12:50 +0000 (03:12 +0000)]
Revert r82939. We can only not special case FieldRegions when the super region has also been invalidated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Sep 2009 02:09:01 +0000 (02:09 +0000)]
Improve support for member function pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Sep 2009 01:23:39 +0000 (01:23 +0000)]
Use a switch statement in VisitCastExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Sep 2009 01:15:29 +0000 (01:15 +0000)]
Make hasAggregateLLVMType use positive checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 29 Sep 2009 00:50:50 +0000 (00:50 +0000)]
Fix http://llvm.org/PR5090.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Sep 2009 23:54:40 +0000 (23:54 +0000)]
Remove test case's dependency on platform headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 28 Sep 2009 23:23:40 +0000 (23:23 +0000)]
Define and use a helper method to call a type conversion
function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 28 Sep 2009 22:03:07 +0000 (22:03 +0000)]
Minor API change. No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 21:45:01 +0000 (21:45 +0000)]
Add all of the C99 complex builtins prefixed with __builtin_
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Sep 2009 21:24:34 +0000 (21:24 +0000)]
Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 21:14:19 +0000 (21:14 +0000)]
Provide a custom diagnostic when code tries to use an unknown builtin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 28 Sep 2009 19:06:58 +0000 (19:06 +0000)]
Multiple conversions to the same type are ambiguous but for the
purpose of overload resolution is to be treated as a uner-defined
conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 18:41:37 +0000 (18:41 +0000)]
Make sure that out-of-line function and variable definitions are not
pushed into scope. Fixes PR5056.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83003
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 28 Sep 2009 18:35:46 +0000 (18:35 +0000)]
Patch for AST representation for the implicit conversion to a function
reference/pointer. And a test case for code gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 18:08:57 +0000 (18:08 +0000)]
Add __builtin_vsnprintf. Thanks to Anders Johnsen
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 07:26:33 +0000 (07:26 +0000)]
Parse a C++ scope specifier followed by a "typename" annotation token as a type name within the declaration specifiers. Fixes PR5061.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 06:34:35 +0000 (06:34 +0000)]
Properly match instantiations of member function templates to the function templates from which they were instantiated
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 04:47:19 +0000 (04:47 +0000)]
Don't allow the same function to enter the overload candidate set
multiple times. This requires to be more careful about re-adding
candidates cached from the function template definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 03:51:44 +0000 (03:51 +0000)]
Determinism is for wimps. <Wimper>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 00:47:05 +0000 (00:47 +0000)]
Teach Sema::isDeclInScope to handle overload sets constructed from
functions that occur in multiple declaration contexts, e.g., because
some were found via using declarations. Now, isDeclInScope will build
a new overload set (when needed) containing only those declarations
that are actually in scope. This eliminates a problem found with
libstdc++'s <iostream>, where the presence of using
In the longer term, I'd like to eliminate Sema::isDeclInScope in favor
of better handling of the RedeclarationOnly flag in the name-lookup
routines. That way, name lookup only returns the entities that matter,
rather than taking the current two-pass approach of producing too many
results and then filtering our the wrong results. It's not efficient,
and I'm sure that we aren't filtering everywhere we should be.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 28 Sep 2009 00:08:27 +0000 (00:08 +0000)]
Improve handling of friend function templates somewhat
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 27 Sep 2009 22:39:07 +0000 (22:39 +0000)]
Specially handle fields, elements, and ivars in
RegionStoreManager::InvalidateRegion() by only removing their old
binding, not conjuring a new symbol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 27 Sep 2009 20:50:04 +0000 (20:50 +0000)]
Add FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 27 Sep 2009 20:45:21 +0000 (20:45 +0000)]
Fix:
<rdar://problem/
6914474 > checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure
The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions. This required a
rewrite of this method using a worklist.
As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument. This tag is used to
differentiate two different symbols created at the same location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82920
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 20:11:34 +0000 (20:11 +0000)]
Mangle dependent name expressions. Fixes PR5063.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82915
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 19:53:49 +0000 (19:53 +0000)]
Use mangleTemplatePrefix when we know that we're mangling a nested template name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82912
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 18:58:34 +0000 (18:58 +0000)]
CodeGen for try statements. (We just emit the body for now).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 27 Sep 2009 10:34:36 +0000 (10:34 +0000)]
CMake generate VS2008 project and CLang and LLVM compile without problem on VS2008. Remove obsolete remark
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82895
91177308 -0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 27 Sep 2009 10:09:11 +0000 (10:09 +0000)]
Handle Eli remark on mingw __declspec macro definition
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 01:06:07 +0000 (01:06 +0000)]
Look for substitutions when mangling TypenameTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 00:38:53 +0000 (00:38 +0000)]
Better template parameter type mangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82883
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 27 Sep 2009 00:12:57 +0000 (00:12 +0000)]
Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 23:14:39 +0000 (23:14 +0000)]
Mangle ::std::basic_string as Sb.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 23:10:05 +0000 (23:10 +0000)]
Mangle ::std::allocator as Sa.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 22:18:22 +0000 (22:18 +0000)]
Handle substitutions in mangleTemplatePrefix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82879
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 21:58:53 +0000 (21:58 +0000)]
Make Decl::dump const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 26 Sep 2009 21:16:00 +0000 (21:16 +0000)]
builtin_trap should be noreturn, this fixes PR5062, patch by
Roman Divacky!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Sep 2009 20:57:03 +0000 (20:57 +0000)]
Simplify the handling of non-dependent friend class template
specializations such as:
friend class std::vector<int>;
by using the same code path as explicit specializations, customized to
reference an existing ClassTemplateSpecializationDecl (or build a new
"undeclared" one).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 20:53:44 +0000 (20:53 +0000)]
Substitute "::std::" as "St".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82874
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 20:13:56 +0000 (20:13 +0000)]
Don't crash when trying to mangle function templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82872
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 19:45:45 +0000 (19:45 +0000)]
mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 19:03:24 +0000 (19:03 +0000)]
Use the qualified name for tag types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 18:16:06 +0000 (18:16 +0000)]
Set alignment on static function level decls and VLAs. Fixes PR5060.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Sep 2009 17:18:44 +0000 (17:18 +0000)]
Added test case for <rdar://problem/
7152418 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82866
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 16:55:29 +0000 (16:55 +0000)]
Address comment from Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 26 Sep 2009 15:06:14 +0000 (15:06 +0000)]
Pass the formatted_raw_ostream to createPrintModulePass and
createBitcodeWriterPass instead of the underlying raw_ostream. This
avoids trouble with formatted_raw_ostream's behavior of setting the
underlying stream to be unbuffered, which resulted in
clang -emit-llvm -S using unbuffered output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Sep 2009 07:43:49 +0000 (07:43 +0000)]
Revert "Force triple in test.", this wasn't the problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82855
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Sep 2009 07:39:39 +0000 (07:39 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Sep 2009 07:36:09 +0000 (07:36 +0000)]
Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Sep 2009 07:06:36 +0000 (07:06 +0000)]
Force triple in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Sep 2009 07:05:09 +0000 (07:05 +0000)]
Fix name lookup for friend class templates to consider anything in a
scope *up to and including* the innermost namespace scope, rather than
just searching in the innermost namespace scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Sep 2009 06:47:28 +0000 (06:47 +0000)]
Rework the Parse-Sema interaction for friends to better support friend
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Sep 2009 04:15:09 +0000 (04:15 +0000)]
Hoist some branches in AnalysisManager::HandleTranslationUnit so we
avoid scanning for an "entry point" FunctionDecl if we (a) have no
translation unit actions and (b) no entry point function has been
specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 03:56:53 +0000 (03:56 +0000)]
Use ABIArgInfo::getDirect() for all types that have a pointer representation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82845
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Sep 2009 03:56:17 +0000 (03:56 +0000)]
Yet another simplifying use of Sema::getMostSpecialized
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82844
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 03:55:37 +0000 (03:55 +0000)]
Mangle record types as decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82843
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Sep 2009 03:54:06 +0000 (03:54 +0000)]
Add a "positive" matching test case for attribute 'noreturn' that involves a nested infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Sep 2009 03:48:56 +0000 (03:48 +0000)]
Add two more test cases for attribute 'noreturn'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 26 Sep 2009 03:41:46 +0000 (03:41 +0000)]
Use Sema::getMostSpecialized to eliminate a redundant implementation of the most-specialized function template
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 03:24:57 +0000 (03:24 +0000)]
Change isTemplate to return the actual template declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82839
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 02:26:02 +0000 (02:26 +0000)]
Improve mangling of typename types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 01:34:51 +0000 (01:34 +0000)]
Rename NextOffset to DataSize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 01:29:10 +0000 (01:29 +0000)]
Start at NextOffset when laying out bases as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 26 Sep 2009 01:21:38 +0000 (01:21 +0000)]
Disable c-index-test on MSVC until someone figures out the real problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 01:09:35 +0000 (01:09 +0000)]
Use NextOffset when laying out a field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 01:02:04 +0000 (01:02 +0000)]
Don't try to dump invalid decls or forward decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Sep 2009 00:12:34 +0000 (00:12 +0000)]
Cast cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 23:53:26 +0000 (23:53 +0000)]
Use explicitly-specified template argument lists to help naming
explicit template specializations, when available.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 25 Sep 2009 22:15:54 +0000 (22:15 +0000)]
Fix cut/paste error resulting in bad column info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82810
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 25 Sep 2009 21:45:39 +0000 (21:45 +0000)]
Add clang_getDeclSource().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 21:45:23 +0000 (21:45 +0000)]
Declarators can now properly represent template-ids, e.g., for
template void f<int>(int);
~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 25 Sep 2009 21:32:34 +0000 (21:32 +0000)]
Add clang_getDeclLine and clang_getDeclColumn
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Sep 2009 18:59:21 +0000 (18:59 +0000)]
Refixed pr5050 per Anders comment. Test case enhanced
per Doug's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 18:43:00 +0000 (18:43 +0000)]
WIP implementation of explicit instantiation of function templates,
member functions of class template specializations, and static data
members. The mechanics are (mostly) present, but the semantic analysis
is very weak.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Sep 2009 18:11:25 +0000 (18:11 +0000)]
Fix the AST tree so ir-gen can do the conversion via copy construction.
Fixed pr5050.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 25 Sep 2009 18:11:00 +0000 (18:11 +0000)]
Fix 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Sep 2009 16:45:10 +0000 (16:45 +0000)]
pcc supports some c99
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 25 Sep 2009 15:39:00 +0000 (15:39 +0000)]
Even more work on empty classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 25 Sep 2009 11:47:22 +0000 (11:47 +0000)]
Fix MSVC build by renaming a variable. PR5043
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 07:03:22 +0000 (07:03 +0000)]
Sigh. Be *really* careful when copying a default function argument during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82761
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 06:56:31 +0000 (06:56 +0000)]
Be careful about copying uninstantiated default arguments during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82760
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 06:44:41 +0000 (06:44 +0000)]
Don't look for __builtin_va_list; it isn't present for all targets
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 06:35:15 +0000 (06:35 +0000)]
CMake build support for libCIndex and c-index-test. The indexing tests
are now running properly from within CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Sep 2009 05:55:59 +0000 (05:55 +0000)]
Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 05:41:21 +0000 (05:41 +0000)]
Hide clang-wpa executable behind a CMake variable so it won't be built by default
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Sep 2009 05:03:45 +0000 (05:03 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 25 Sep 2009 04:25:58 +0000 (04:25 +0000)]
Fix checking for a null pointer constant when the expression itself is
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.
In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 25 Sep 2009 02:18:37 +0000 (02:18 +0000)]
Add a reduced test case for the weak ivar infinite recursion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82747
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 25 Sep 2009 01:54:38 +0000 (01:54 +0000)]
Who would have thought that empty classes were so tricky? Handle cases where an empty virtual base class needs to be moved aside because it conflicts with the first field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82746
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 25 Sep 2009 01:40:47 +0000 (01:40 +0000)]
Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82745
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 25 Sep 2009 01:23:32 +0000 (01:23 +0000)]
Handle array fields that contain empty structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Sep 2009 00:18:15 +0000 (00:18 +0000)]
Fix <rdar://problem/
7249327 > by allowing silent conversions between signed and unsigned integer values for symbolic values. This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 25 Sep 2009 00:02:51 +0000 (00:02 +0000)]
More work on empty classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Sep 2009 00:00:20 +0000 (00:00 +0000)]
Fixed another code gen bug in objc's new write-barrier API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 24 Sep 2009 23:50:42 +0000 (23:50 +0000)]
Improve the record layout dumper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Sep 2009 23:39:01 +0000 (23:39 +0000)]
When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).
Test this via some explicit specializations of member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 24 Sep 2009 23:30:46 +0000 (23:30 +0000)]
Make it really, really easy to change the alignment of Type (and ExtQuals).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82730
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 24 Sep 2009 23:14:47 +0000 (23:14 +0000)]
WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks
There are many caveats here:
- We completely and totally drop any explicitly-specified template
arguments on the floor
- We don't diagnose any of the extra semantic things that we should
diagnose.
- I haven't looked to see that we're getting the right linkage for
explicit specializations
On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728
91177308 -0d34-0410-b5e6-
96231b3b80d8