Граф коммитов

43341 Коммитов

Автор SHA1 Сообщение Дата
Argyrios Kyrtzidis 08aba1bc55 [lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Builtin_intrinsics.sse2
Module "sse" implicitly exports module "sse2".
This is bad because we also have module "sse2" export module "sse" (as intended) so we end up with a cycle
in the module import graph:
1. sse2 -> (also imports) sse
2. sse -> (also imports) sse2

To eliminate the cycle remove 2.; importing module "sse2" will also import module "sse", but just importing
module "sse" will not also import module "sse2".

rdar://13240552

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178117 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 05:12:34 +00:00
Joao Matos 9ef9875bbe Implement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.
Patch by me and Ryan Molden.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:34:16 +00:00
Argyrios Kyrtzidis 07ffbd74e2 [lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
This makes it identical with the system definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178110 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:37 +00:00
Argyrios Kyrtzidis 52151fd57e [modules] Before marking the module imported macros as ambiguous, check if this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.

For example (these come from different modules):
   \#define LONG_MAX __LONG_MAX__ (clang's limits.h)
   \#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178109 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:34 +00:00
Argyrios Kyrtzidis 7ca8e9160a Remove IdentifierInfo::setHadMacroDefinition()
It's not used anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:31 +00:00
Argyrios Kyrtzidis 89b8f06ed7 [PCH/modules] Remove HiddenName::MacroUndef
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178107 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:28 +00:00
Argyrios Kyrtzidis d560ce3b66 [Preprocessor] Remove PPMutationListener.
It's not used anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178106 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:24 +00:00
Argyrios Kyrtzidis 35803282ef [modules] Re-enable the "ambiguous expansion of macro" warning.
Also update "test/Modules/macros.c" to test modified semantics:
-When there is an ambiguous macro, expand using the latest introduced version, not the first one.
-#undefs in submodules cause the macro to not be exported by that submodule, it doesn't cause
 undefining of macros in the translation unit that imported that submodule.
 This reduces macro namespace interference across modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178105 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 01:25:19 +00:00
Richard Smith 12fef490dc PR15597: Fix a confusion between the implicit exception specification and the
uninstantiated exception specification when a special member within a class
template is both defaulted and given an exception specification on its first
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 00:22:47 +00:00
Chad Rosier a03fc6e249 If we're unable to create the TargetMachine, then just quit producing the
backend output; there's no need to report a fatal error.  This reverts r178042.
Part of rdar://13295753 and rdar://13401547


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178102 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 00:14:35 +00:00
David Blaikie 5035c483b7 Update debug info test for schema change made to LLVM.
This accounts for the addition of another field to DIScopes that will be used
to store a list of DIImportedModules in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178100 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 00:08:24 +00:00
John McCall fdb468fc8a Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178098 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 00:03:48 +00:00
Ted Kremenek 8b43d2b0ea Split "incomplete implementation" warnings for ObjC into separate warnings.
Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes.  Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178097 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 00:02:21 +00:00
Douglas Gregor defa32ef4f <rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178095 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:59:23 +00:00
Anna Zaks ddb61764ab [analyzer] Better test for r178063.
Jordan pointed out that my previously committed test was bogus.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178094 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:58:52 +00:00
Anna Zaks 1533833e21 [analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit.

Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr
or ExprWithCleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:58:49 +00:00
David Blaikie 2fcadbeecb Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178092 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:47:35 +00:00
Chad Rosier c48d575f2e [driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://13362359


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:41:30 +00:00
Douglas Gregor 0162c1ce29 <rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.
When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:36:30 +00:00
Chad Rosier 7020346e41 Remove a FIXME that's not planned to be fixed. We only generated crash
diagnostics for the first failing command.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 23:25:41 +00:00
Douglas Gregor e79ce292d9 <rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178081 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 22:43:55 +00:00
David Blaikie d74505e985 Debug Info: remove use of magic numbers to tweak specific debug info metadata fields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178079 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 22:09:53 +00:00
Anna Zaks 8a660eb108 [analyzer] Change inlining policy to inline small functions when reanalyzing ObjC methods as top level.
This allows us to better reason about(inline) small wrapper functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178063 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:57:58 +00:00
Anna Zaks df5f80f8a3 [analyzer] micro optimization as per Jordan’s feedback on r177905.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178062 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:57:51 +00:00
NAKAMURA Takumi 4e493bd968 clang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
With dosish filename, it misgenerates an improper extra entry.

!1 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX/debug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX\5Cdebug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 is unexpected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178061 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:57:40 +00:00
Rafael Espindola 6c82fc65e4 Remove useGlobalsForAutomaticVariables.
It is unused since pic support went away.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178055 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:41:47 +00:00
Reid Kleckner 852e3d7143 [ms-cxxabi] Give the MS inheritance attributes a base class
Required making a handful of changes to the table generator.  Also adds
an unspecified inheritance attribute.  This opens the path for us to
apply these attributes to C++ records implicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:30:28 +00:00
Manman Ren 94d46b5510 Fix uninitialized read of CalleeWithThisReturn.
Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.

PR15598


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178053 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:29:15 +00:00
Chad Rosier e2359e2132 Fix a crasher by reporting a fatal error if we're unable to create the target
machine and one is required.
Part of rdar://13295753


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 18:01:48 +00:00
Michael Liao 72339a0d16 Add PRFCHW intrinsic support
- Add head 'prfchwintrin.h' to define '_m_prefetchw' which is mapped to
  LLVM/clang prefetch builtin
- Add option '-mprfchw' to enable PRFCHW feature and pre-define '__PRFCHW__'
  macro



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 17:52:08 +00:00
Argyrios Kyrtzidis c56fff7fd2 [Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.
For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:

-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
 PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
 (which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 17:17:01 +00:00
Reid Kleckner 1232e279b4 [ms-cxxabi] Mangle vector types
Summary:
The only vector types a user can pass from MSVC code to clang code are
the ones from *mmintrin.h, so we only have to match the MSVC mangling
for these types.  MSVC mangles the __m128 family of types as tag types,
which we match.  For other vector types, we emit a unique tag type
mangling that won't match anything produced by MSVC.

Reviewers: rjmccall

CC: chandlerc, timurrrr, cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D576

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 16:56:59 +00:00
Evgeniy Stepanov 76ed61788e Fix uninitialized read of CalleeWithThisReturn.
CalleeWithThisReturn can be left initialized if HasThisReturn() is false.
This change reverses the order of checks in EmitFunctionEpilog such that
CalleeWithThisReturn is only examined when it has a meaningful value.

Found with MemorySanitizer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 13:44:29 +00:00
Alexey Samsonov 231b2bc2a0 Actually mark ASan-unfriendly test as XFAIL
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 08:45:29 +00:00
Alexey Samsonov 48c08343fa Add asan/msan to the list of available features in LIT test runner. Mark ASan-unfriendly test as XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 08:28:18 +00:00
Chandler Carruth 42958026f0 Manually specify the link dependencies. Turns out that all the work on
LLVMBuild stuff didn't actually provide a single place for dependencies,
it just added a third place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177989 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 03:45:48 +00:00
Richard Trieu 8af742a499 Handle CXXOperatorCallExpr when checking self referrnce during initialization of
class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 03:41:40 +00:00
Chandler Carruth 9cc935b699 The IRReader header is now part of its own library. Update the include
line and the library dependencies to reflect this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 02:25:54 +00:00
Richard Smith f9223aad26 Remove FIXMEs: these are covered by a core issue which we don't yet implement
(but we happen to get this part right).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177958 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 01:17:18 +00:00
Richard Smith 2db075b1d3 Implement special-case name lookup for inheriting constructors: member
using-declarations with names which look constructor-like are interpreted as
constructor names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177957 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 01:15:19 +00:00
Richard Smith c2e935f280 Remove some no-op static_casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 00:54:11 +00:00
Fariborz Jahanian b501aeb238 Objective-C: Property declaration overiding one in
its super class or protocols inherit their 
availability/deprecated attribute. // rdar://13467644


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177948 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:59:42 +00:00
NAKAMURA Takumi 4d553c96ad clang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.
I know MemoryBuffer might affect this. Still investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:49:11 +00:00
Douglas Gregor 6c5aaed0d4 <rdar://problem/13395022> Strip references when extracting an initializer_list's element type during application of an initialization sequence.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177944 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:47:01 +00:00
Douglas Gregor dc392c1bae <rdar://problem/13185264> Don't crash when attempting to redundantly initialize a member of an anonymous union.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:28:23 +00:00
Matt Beaumont-Gay 2275b79621 Fix layering violation harder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:19:32 +00:00
Douglas Gregor 7aac45a082 <rdar://problem/13358795> Teach CMake to check Subversion version information at build time, not configure time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177939 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:16:38 +00:00
Ted Kremenek b27564e875 Fix testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177934 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 23:05:40 +00:00
Ted Kremenek 6edb029026 For printf checking, handle nested typedefs for darwin-specific checking.
Fixes <rdar://problem/13491605>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:28:37 +00:00
Douglas Gregor abde2c7f2c <rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying type in Objective-C (as well as C++11).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177930 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:22:35 +00:00