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

43275 Коммитов

Автор SHA1 Сообщение Дата
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
Douglas Gregor e91544210a Remove local path from test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177925 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:52:42 +00:00
Douglas Gregor 87ab066c70 Use <time.h> rather than <sys/time.h>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177924 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:51:16 +00:00
Douglas Gregor 5d835266d5 Use xargs rather than
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177923 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:49:54 +00:00
Matt Beaumont-Gay b63d8d2609 Fix a layering violation introduced in r177705.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:32:02 +00:00
Douglas Gregor 5dca66c3d0 Use 'touch -t', which both BSD and Linux support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:27:57 +00:00
Nick Lewycky cdd81e5a68 Try harder to be signal-safe inside our signal handler. The most prominent behavioural
difference is that we no longer clean the token before emitting it. This fixes a bug where
clang hangs in the middle of crashing because the crash handler calls malloc from inside
a crash that happened inside of free.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177919 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:24:30 +00:00
Douglas Gregor d44d2872b2 <rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177918 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:19:16 +00:00
Nick Lewycky fd61d6fe0a Correct indentation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177916 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:10:14 +00:00
Bill Wendling 14df23bd11 Emit an error message instead of crashing when dereferencing an incomplete pointer type.
If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:09:49 +00:00
Chad Rosier 1f1df1f48e IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 21:00:27 +00:00
Anna Zaks 5db8fac5f3 [analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset binding, even if no bindings are present.
This addresses an undefined value false positive from concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment.

Fixes PR14877; radar://12991168.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 20:43:24 +00:00
Fariborz Jahanian 4eb17e553c Added PR number for failing win64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177886 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 18:56:45 +00:00
Daniel Jasper 0ff72fc9fa Re-add clang-format tests to clang/test.
Also now use -strict-whitespace as the tests are confusing otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 09:14:25 +00:00
Anton Yartsev 2de19edab6 [analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 01:35:45 +00:00
Jordan Rose 8f7bfb40b7 [analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.
These aren't generated by default, but they are needed when either side of
the comparison is tainted.

Should fix our internal buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177846 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-24 20:25:22 +00:00
Benjamin Kramer f4492448a2 Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177842 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-24 16:04:55 +00:00