]>
granicus.if.org Git - clang/log
Mike Stump [Wed, 28 Oct 2009 21:22:24 +0000 (21:22 +0000)]
Refine __builtin_object_size. Don't try and get a size for things
that don't have sizes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 21:07:28 +0000 (21:07 +0000)]
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 20:55:41 +0000 (20:55 +0000)]
Code gen for array construction - WIP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 28 Oct 2009 20:44:47 +0000 (20:44 +0000)]
Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/
7310688 >.
Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.
I wanted to land the major changes before finishing up the optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 28 Oct 2009 20:44:03 +0000 (20:44 +0000)]
Refactor a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 28 Oct 2009 20:37:47 +0000 (20:37 +0000)]
Pull ivar scanning logic into another utility function. This refactoring will enable scanning
categories as well (WIP). No functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 28 Oct 2009 20:36:47 +0000 (20:36 +0000)]
factor a creation of Int32Ty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 19:04:36 +0000 (19:04 +0000)]
Use array's base element type in getting to its
constructor. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 18:41:06 +0000 (18:41 +0000)]
Removed an unnecessary arguement passed to InitializeVarWithConstructor
which should come from the variable and wasn't correct for arrays in any case.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 18:06:53 +0000 (18:06 +0000)]
Restored note on pointer to members with a pointer
to issue involved.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 28 Oct 2009 17:39:19 +0000 (17:39 +0000)]
random tidying
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 17:25:01 +0000 (17:25 +0000)]
Removed a Note related to pointer to member functions which
does not seem to exist any longer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 28 Oct 2009 16:49:46 +0000 (16:49 +0000)]
Diagnose use of data pointer member in a function call
expression instead of crashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 28 Oct 2009 16:31:34 +0000 (16:31 +0000)]
Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Wed, 28 Oct 2009 15:13:08 +0000 (15:13 +0000)]
Fix for PR4887, Credit to Jonathan Gray.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 28 Oct 2009 12:23:03 +0000 (12:23 +0000)]
make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.
Patch by Simone Pellegrini.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 28 Oct 2009 05:12:07 +0000 (05:12 +0000)]
adjust for a pending LLVM change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 28 Oct 2009 01:51:46 +0000 (01:51 +0000)]
Add mangling for VTTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 28 Oct 2009 00:35:46 +0000 (00:35 +0000)]
Finish off pure virtual function handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 28 Oct 2009 00:29:27 +0000 (00:29 +0000)]
Slightly improve source location information during template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 23:55:05 +0000 (23:55 +0000)]
Test
explicit-instantiation-declaration-after-explicit-instantiation-definition
errors. This wraps up explicit template instantiation for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 27 Oct 2009 23:46:47 +0000 (23:46 +0000)]
Prep work for putting ___cxa_pure_virtual in the vtables for pure functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 27 Oct 2009 23:36:26 +0000 (23:36 +0000)]
Refactor code a little.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 23:26:40 +0000 (23:26 +0000)]
Implement proper linkage for explicit instantiation declarations of
inlined functions. For example, given
template<typename T>
class string {
unsigned Len;
public:
unsigned size() const { return Len; }
};
extern template class string<char>;
we now give the instantiation of string<char>::size
available_externally linkage (if it is ever instantiated!), as
permitted by the C++0x standard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 27 Oct 2009 23:02:38 +0000 (23:02 +0000)]
Type of a conditional expression with two distinct objective-c
class pointer is the most derived common class of the two.
This is <rdar://problem/
7334235 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 27 Oct 2009 22:09:17 +0000 (22:09 +0000)]
__builtin_object_size refinements. Ensure we handle expressions with
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.
We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 27 Oct 2009 21:15:21 +0000 (21:15 +0000)]
CMake: Respect LLVM_LIBDIR_SUFFIX for clang-specific headers under
${libdir}/clang
Patch by Ingmar Vanhassel!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 21:11:48 +0000 (21:11 +0000)]
Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 21:01:01 +0000 (21:01 +0000)]
Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 20:53:28 +0000 (20:53 +0000)]
Explicit instantiation suppresses the instantiation of non-inline
function template specializations and member functions of class
template specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 27 Oct 2009 19:59:34 +0000 (19:59 +0000)]
Rather than excluding quite some things, and still installing
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.
Patch by Ingmar Vanhassel!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 27 Oct 2009 19:48:08 +0000 (19:48 +0000)]
Set OptimizeForSize LLVM function attribute with -Os.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 27 Oct 2009 19:48:00 +0000 (19:48 +0000)]
Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 27 Oct 2009 19:42:21 +0000 (19:42 +0000)]
CMake: Append LLVM_LIBDIR_SUFFIX to library destination.
Based on a patch by Ingmar Vanhassel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 27 Oct 2009 19:21:30 +0000 (19:21 +0000)]
Fix crash when synthesizing property setters when the property type and ivar
type have mismatched Objective-C types.
- <rdar://problem/
7336352 > [irgen] crash in synthesized property construction
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85275
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 18:42:08 +0000 (18:42 +0000)]
An explicit instantiation definition only instantiations those class
members that have a definition. Also, use
CheckSpecializationInstantiationRedecl as part of this instantiation
to make sure that we diagnose the various kinds of problems that can
occur with explicit instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 27 Oct 2009 16:51:19 +0000 (16:51 +0000)]
Generate constructor for value-initialization cases, even if the
implementation technique doesn't call the constructor at that point.
DR302. Fixes pr5296.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85249
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 15:36:37 +0000 (15:36 +0000)]
Test for interaction between explicit instantiations and specializations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85244
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 15:00:12 +0000 (15:00 +0000)]
Test various aspects of explicit instantiation that were already implemented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85243
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Tue, 27 Oct 2009 14:58:27 +0000 (14:58 +0000)]
Disabling some MS extensions which cause this test to fail
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 27 Oct 2009 14:47:31 +0000 (14:47 +0000)]
Split AddDefaultSystemIncludePaths into C, C++ and framework specific functions.
The user visible changes are:
*) Frameworks are only searched on OS X
*) The Cygwin c++ headers are now marked as c++ aware. I am almost
sure that not marking them was a bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 27 Oct 2009 14:35:18 +0000 (14:35 +0000)]
Add support for 'CXFile' (<rdar://problem/
7303360 >).
- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).
- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header.
- Also changed CXX style comment to C style (to eliminate warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 27 Oct 2009 14:32:27 +0000 (14:32 +0000)]
Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Tue, 27 Oct 2009 14:31:53 +0000 (14:31 +0000)]
Disabling some MS extensions which cause these tests to fail
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85236
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Tue, 27 Oct 2009 13:42:56 +0000 (13:42 +0000)]
Changes for building as a Windows DLL
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 27 Oct 2009 12:19:13 +0000 (12:19 +0000)]
Make test independent of darwin system headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 27 Oct 2009 12:10:02 +0000 (12:10 +0000)]
Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 27 Oct 2009 10:09:29 +0000 (10:09 +0000)]
fix tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 27 Oct 2009 06:26:26 +0000 (06:26 +0000)]
Only set the point of instantiation for an implicit or explicit
instantiation once we have committed to performing the
instantiation. As part of this, make our makeshift
template-instantiation location information suck slightly less.
Fixes PR5264.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 27 Oct 2009 03:59:44 +0000 (03:59 +0000)]
Typo in revision 85201.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 27 Oct 2009 03:47:36 +0000 (03:47 +0000)]
Convert Preprocessor Clang tests to FileCheck in regards to PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85201
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 27 Oct 2009 03:14:56 +0000 (03:14 +0000)]
Fix a broken test in rev. 85199.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 27 Oct 2009 02:36:32 +0000 (02:36 +0000)]
Convert Preprocessor Clang tests to FileCheck in regards to PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 27 Oct 2009 02:07:23 +0000 (02:07 +0000)]
Almost missed this one... Doc update for last change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 27 Oct 2009 01:59:05 +0000 (01:59 +0000)]
Refine noreturn handling. Fixes -Wmissing-noreturn so that it doesn't
complain that functions that have a return statement should be
declared noreturn. Fixed PR5286.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 27 Oct 2009 01:45:51 +0000 (01:45 +0000)]
Preprocessor tests are whitespace sensitive, as per Revision: 85170 review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 27 Oct 2009 01:07:53 +0000 (01:07 +0000)]
Use a pred_iterator instead of a succ_iterator (wrong typedef).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 27 Oct 2009 01:05:20 +0000 (01:05 +0000)]
Add test cases for <rdar://problem/
7332673 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 27 Oct 2009 00:29:40 +0000 (00:29 +0000)]
Document -nobuiltininc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 26 Oct 2009 23:39:48 +0000 (23:39 +0000)]
Prep for future __builtin_object_size refinements. The theory is that
someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases. WIP.
For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 26 Oct 2009 23:05:19 +0000 (23:05 +0000)]
__builtin_object_size refinements. Also handle stack based objects. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Mon, 26 Oct 2009 22:51:02 +0000 (22:51 +0000)]
Convert a few tests to FileCheck for PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 26 Oct 2009 22:14:08 +0000 (22:14 +0000)]
Unify Unix and Windows code paths when executing 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 26 Oct 2009 22:08:39 +0000 (22:08 +0000)]
Remove unnecessary calls to 'flush()'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 26 Oct 2009 21:58:25 +0000 (21:58 +0000)]
Add Code gen support for '->*' operator which fell
through the crack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 26 Oct 2009 21:38:39 +0000 (21:38 +0000)]
__builtin_object_size refinements. When we run out of object, be sure
to clamp at 0 bytes left. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Mon, 26 Oct 2009 20:49:20 +0000 (20:49 +0000)]
Convert a few tests to FileCheck for PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 26 Oct 2009 20:45:27 +0000 (20:45 +0000)]
Add 'fixit' hint on mis-use of pointer-to-member
binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 26 Oct 2009 20:36:31 +0000 (20:36 +0000)]
Add some missing header files to the Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 26 Oct 2009 18:57:47 +0000 (18:57 +0000)]
Be sure to zero-extend. And refactor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 26 Oct 2009 18:35:08 +0000 (18:35 +0000)]
__builtin_object_size refinements. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 26 Oct 2009 18:07:30 +0000 (18:07 +0000)]
Convert some driver checks to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 26 Oct 2009 17:52:49 +0000 (17:52 +0000)]
clang-cc: Allow building for x86_64 with -mmacosx-version-min=10.4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 26 Oct 2009 17:14:14 +0000 (17:14 +0000)]
Switch vtable to linkeonce_odr. Patch by nlewycky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 26 Oct 2009 17:01:32 +0000 (17:01 +0000)]
Add fixit hint to bitwise precedence warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 26 Oct 2009 16:27:58 +0000 (16:27 +0000)]
assert -> llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 26 Oct 2009 15:24:15 +0000 (15:24 +0000)]
Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 26 Oct 2009 13:36:57 +0000 (13:36 +0000)]
Rename -nostdclanginc to -nobuiltininc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 26 Oct 2009 05:18:31 +0000 (05:18 +0000)]
'error' is usually used as a noreturn function. This can suppress some false
warnings. Eventually we need a way to import externally defined functions
summaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 26 Oct 2009 01:37:10 +0000 (01:37 +0000)]
Update location of DataTypes.h to reflect move in LLVM with r85086.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 25 Oct 2009 23:11:15 +0000 (23:11 +0000)]
Phrase compile time assert in standard way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:49:18 +0000 (22:49 +0000)]
rename getTypeSigned() -> isTypeSigned() per daniel's review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:43:07 +0000 (22:43 +0000)]
Fix PR5298 - -Wmissing-noreturn shouldn't warn if the function is already
declared noreturn.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:31:57 +0000 (22:31 +0000)]
Implement rdar://
6756623 - use of deprecated type in deprecated typedef should not warn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 25 Oct 2009 22:31:45 +0000 (22:31 +0000)]
Make sure we actually have a definition before asking if it is implicit. Fixes PR4674.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:21:57 +0000 (22:21 +0000)]
When parsing a top level struct declaration, make sure to
process decl attributes instead of dropping them on the floor.
This allows us to diagnose cases like the testcase. Also don't
diagnose deprecated stuff in ActOnTag: not all uses of tags
may be 'uses', and SemaType does this now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:09:09 +0000 (22:09 +0000)]
move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable
types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName
is sometimes used as a predicate in the parser, so it could cause redundant
diags to be emitted. This is also needed by two upcoming enhancements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 22:05:13 +0000 (22:05 +0000)]
cleanups
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 25 Oct 2009 21:45:37 +0000 (21:45 +0000)]
Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 21:19:07 +0000 (21:19 +0000)]
remove a nonsensical todo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85067
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 25 Oct 2009 20:34:02 +0000 (20:34 +0000)]
Tweak test, with -strict-whitespace $ won't match on Windows because the buffer
will have \r\n.
- Perhaps we should make FileCheck normalize line-endings, even in
strict-whitespace mode?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 18:25:04 +0000 (18:25 +0000)]
move the extwarn about using long long out of the entry of
GetTypeForDeclarator and into the code that handles long long
already.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 18:21:37 +0000 (18:21 +0000)]
simplify interface to ConvertDeclSpecToType, check for inferred
block return types only when a TST isn't specified, not every time
through GetTypeForDeclarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 18:07:27 +0000 (18:07 +0000)]
change ConvertDeclSpecToType to be a static function in SemaType.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 17:47:27 +0000 (17:47 +0000)]
change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead
of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp.
We do this by cons'ing up a trivial Declarator for the type.
John, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 17:36:50 +0000 (17:36 +0000)]
various cleanups for SemaType.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 17:21:40 +0000 (17:21 +0000)]
minor reorg: check both attributes before decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 17:16:46 +0000 (17:16 +0000)]
simplify Sema::getTypeName a bit: if control gets out of the switch,
IIDecl cannot be null. There is no need to check for both C++ mode and
presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 25 Oct 2009 17:04:48 +0000 (17:04 +0000)]
In objc mode, every identifier in a cast expression was using doing a
type looking using getTypeName() and every property access was using
NextToken() to do lookahead to see if the identifier is followed by
a '.'. Rearrange this code to not need lookahead and only do the
type lookup if we have "identifier." in the token stream. Also
improve a diagnostic a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 25 Oct 2009 17:03:50 +0000 (17:03 +0000)]
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85055
91177308 -0d34-0410-b5e6-
96231b3b80d8