]> granicus.if.org Git - clang/log
clang
11 years agoDisable ASan/MSan symbolization of reports in tests.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:11:46 +0000 (13:11 +0000)]
Disable ASan/MSan symbolization of reports in tests.

It was using an instrumented symbolizer binary, which is a potential fork bomb.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178140 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.
Evgeniy Stepanov [Wed, 27 Mar 2013 13:05:40 +0000 (13:05 +0000)]
Mark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178138 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago<rdar://problem/13317030> Consider using directives when performing unqualified name...
Douglas Gregor [Wed, 27 Mar 2013 12:51:49 +0000 (12:51 +0000)]
<rdar://problem/13317030> Consider using directives when performing unqualified name lookup into declarations contexts represented by the qualified-id but not in the actual scope hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178136 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSplit line comments
Alexander Kornienko [Wed, 27 Mar 2013 11:52:18 +0000 (11:52 +0000)]
Split line comments

Summary:
Split line comments that exceed column limit + fixed leading whitespace
handling when splitting block comments.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D577

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178133 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix testcase to add expected note.
Bill Wendling [Wed, 27 Mar 2013 06:45:37 +0000 (06:45 +0000)]
Fix testcase to add expected note.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178122 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPass the diagnostic in for better error messages.
Bill Wendling [Wed, 27 Mar 2013 06:06:26 +0000 (06:06 +0000)]
Pass the diagnostic in for better error messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178120 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Buil...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 05:12:34 +0000 (05:12 +0000)]
[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

11 years agoImplement compiler intrinsics needed for compatibility with MSVC 2012 <type_traits>.
Joao Matos [Wed, 27 Mar 2013 01:34:16 +0000 (01:34 +0000)]
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

11 years ago[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:37 +0000 (01:25 +0000)]
[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

11 years ago[modules] Before marking the module imported macros as ambiguous, check if this is...
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:34 +0000 (01:25 +0000)]
[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

11 years agoRemove IdentifierInfo::setHadMacroDefinition()
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:31 +0000 (01:25 +0000)]
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

11 years ago[PCH/modules] Remove HiddenName::MacroUndef
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:28 +0000 (01:25 +0000)]
[PCH/modules] Remove HiddenName::MacroUndef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178107 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[Preprocessor] Remove PPMutationListener.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:24 +0000 (01:25 +0000)]
[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

11 years ago[modules] Re-enable the "ambiguous expansion of macro" warning.
Argyrios Kyrtzidis [Wed, 27 Mar 2013 01:25:19 +0000 (01:25 +0000)]
[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

11 years agoPR15597: Fix a confusion between the implicit exception specification and the
Richard Smith [Wed, 27 Mar 2013 00:22:47 +0000 (00:22 +0000)]
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

11 years agoIf we're unable to create the TargetMachine, then just quit producing the
Chad Rosier [Wed, 27 Mar 2013 00:14:35 +0000 (00:14 +0000)]
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

11 years agoUpdate debug info test for schema change made to LLVM.
David Blaikie [Wed, 27 Mar 2013 00:08:24 +0000 (00:08 +0000)]
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

11 years agoMake the -Wreinterpret-base-class logic safe against invalid
John McCall [Wed, 27 Mar 2013 00:03:48 +0000 (00:03 +0000)]
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

11 years agoSplit "incomplete implementation" warnings for ObjC into separate warnings.
Ted Kremenek [Wed, 27 Mar 2013 00:02:21 +0000 (00:02 +0000)]
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

11 years ago<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference...
Douglas Gregor [Tue, 26 Mar 2013 23:59:23 +0000 (23:59 +0000)]
<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

11 years ago[analyzer] Better test for r178063.
Anna Zaks [Tue, 26 Mar 2013 23:58:52 +0000 (23:58 +0000)]
[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

11 years ago[analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Anna Zaks [Tue, 26 Mar 2013 23:58:49 +0000 (23:58 +0000)]
[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

11 years agoRemove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
David Blaikie [Tue, 26 Mar 2013 23:47:35 +0000 (23:47 +0000)]
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

11 years ago[driver] Do not generate crash diagnostics if the compilation command failed
Chad Rosier [Tue, 26 Mar 2013 23:41:30 +0000 (23:41 +0000)]
[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

11 years ago<rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns...
Douglas Gregor [Tue, 26 Mar 2013 23:36:30 +0000 (23:36 +0000)]
<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

11 years agoRemove a FIXME that's not planned to be fixed. We only generated crash
Chad Rosier [Tue, 26 Mar 2013 23:25:41 +0000 (23:25 +0000)]
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

11 years ago<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return...
Douglas Gregor [Tue, 26 Mar 2013 22:43:55 +0000 (22:43 +0000)]
<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

11 years agoDebug Info: remove use of magic numbers to tweak specific debug info metadata fields
David Blaikie [Tue, 26 Mar 2013 22:09:53 +0000 (22:09 +0000)]
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

11 years ago[analyzer] Change inlining policy to inline small functions when reanalyzing ObjC...
Anna Zaks [Tue, 26 Mar 2013 18:57:58 +0000 (18:57 +0000)]
[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

11 years ago[analyzer] micro optimization as per Jordan’s feedback on r177905.
Anna Zaks [Tue, 26 Mar 2013 18:57:51 +0000 (18:57 +0000)]
[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

11 years agoclang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
NAKAMURA Takumi [Tue, 26 Mar 2013 18:57:40 +0000 (18:57 +0000)]
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

11 years agoRemove useGlobalsForAutomaticVariables.
Rafael Espindola [Tue, 26 Mar 2013 18:41:47 +0000 (18:41 +0000)]
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

11 years ago[ms-cxxabi] Give the MS inheritance attributes a base class
Reid Kleckner [Tue, 26 Mar 2013 18:30:28 +0000 (18:30 +0000)]
[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

11 years agoFix uninitialized read of CalleeWithThisReturn.
Manman Ren [Tue, 26 Mar 2013 18:29:15 +0000 (18:29 +0000)]
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

11 years agoFix a crasher by reporting a fatal error if we're unable to create the target
Chad Rosier [Tue, 26 Mar 2013 18:01:48 +0000 (18:01 +0000)]
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

11 years agoAdd PRFCHW intrinsic support
Michael Liao [Tue, 26 Mar 2013 17:52:08 +0000 (17:52 +0000)]
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

11 years ago[Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirect...
Argyrios Kyrtzidis [Tue, 26 Mar 2013 17:17:01 +0000 (17:17 +0000)]
[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

11 years ago[ms-cxxabi] Mangle vector types
Reid Kleckner [Tue, 26 Mar 2013 16:56:59 +0000 (16:56 +0000)]
[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

11 years agoFix uninitialized read of CalleeWithThisReturn.
Evgeniy Stepanov [Tue, 26 Mar 2013 13:44:29 +0000 (13:44 +0000)]
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

11 years agoActually mark ASan-unfriendly test as XFAIL
Alexey Samsonov [Tue, 26 Mar 2013 08:45:29 +0000 (08:45 +0000)]
Actually mark ASan-unfriendly test as XFAIL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177997 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd asan/msan to the list of available features in LIT test runner. Mark ASan-unfrien...
Alexey Samsonov [Tue, 26 Mar 2013 08:28:18 +0000 (08:28 +0000)]
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

11 years agoManually specify the link dependencies. Turns out that all the work on
Chandler Carruth [Tue, 26 Mar 2013 03:45:48 +0000 (03:45 +0000)]
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

11 years agoHandle CXXOperatorCallExpr when checking self referrnce during initialization of
Richard Trieu [Tue, 26 Mar 2013 03:41:40 +0000 (03:41 +0000)]
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

11 years agoThe IRReader header is now part of its own library. Update the include
Chandler Carruth [Tue, 26 Mar 2013 02:25:54 +0000 (02:25 +0000)]
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

11 years agoRemove FIXMEs: these are covered by a core issue which we don't yet implement
Richard Smith [Tue, 26 Mar 2013 01:17:18 +0000 (01:17 +0000)]
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

11 years agoImplement special-case name lookup for inheriting constructors: member
Richard Smith [Tue, 26 Mar 2013 01:15:19 +0000 (01:15 +0000)]
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

11 years agoRemove some no-op static_casts.
Richard Smith [Tue, 26 Mar 2013 00:54:11 +0000 (00:54 +0000)]
Remove some no-op static_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177954 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoObjective-C: Property declaration overiding one in
Fariborz Jahanian [Mon, 25 Mar 2013 23:59:42 +0000 (23:59 +0000)]
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

11 years agoclang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.
NAKAMURA Takumi [Mon, 25 Mar 2013 23:49:11 +0000 (23:49 +0000)]
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

11 years ago<rdar://problem/13395022> Strip references when extracting an initializer_list's...
Douglas Gregor [Mon, 25 Mar 2013 23:47:01 +0000 (23:47 +0000)]
<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

11 years ago<rdar://problem/13185264> Don't crash when attempting to redundantly initialize a...
Douglas Gregor [Mon, 25 Mar 2013 23:28:23 +0000 (23:28 +0000)]
<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

11 years agoFix layering violation harder.
Matt Beaumont-Gay [Mon, 25 Mar 2013 23:19:32 +0000 (23:19 +0000)]
Fix layering violation harder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177940 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago<rdar://problem/13358795> Teach CMake to check Subversion version information at...
Douglas Gregor [Mon, 25 Mar 2013 23:16:38 +0000 (23:16 +0000)]
<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

11 years agoFix testcase.
Ted Kremenek [Mon, 25 Mar 2013 23:05:40 +0000 (23:05 +0000)]
Fix testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177934 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFor printf checking, handle nested typedefs for darwin-specific checking.
Ted Kremenek [Mon, 25 Mar 2013 22:28:37 +0000 (22:28 +0000)]
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

11 years ago<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying...
Douglas Gregor [Mon, 25 Mar 2013 22:22:35 +0000 (22:22 +0000)]
<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

11 years agoRemove local path from test.
Douglas Gregor [Mon, 25 Mar 2013 21:52:42 +0000 (21:52 +0000)]
Remove local path from test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177925 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse <time.h> rather than <sys/time.h>
Douglas Gregor [Mon, 25 Mar 2013 21:51:16 +0000 (21:51 +0000)]
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

11 years agoUse xargs rather than
Douglas Gregor [Mon, 25 Mar 2013 21:49:54 +0000 (21:49 +0000)]
Use xargs rather than

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177923 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a layering violation introduced in r177705.
Matt Beaumont-Gay [Mon, 25 Mar 2013 21:32:02 +0000 (21:32 +0000)]
Fix a layering violation introduced in r177705.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177922 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse 'touch -t', which both BSD and Linux support.
Douglas Gregor [Mon, 25 Mar 2013 21:27:57 +0000 (21:27 +0000)]
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

11 years agoTry harder to be signal-safe inside our signal handler. The most prominent behavioural
Nick Lewycky [Mon, 25 Mar 2013 21:24:30 +0000 (21:24 +0000)]
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

11 years ago<rdar://problem/13434605> Periodically prune the module cache so that it does not...
Douglas Gregor [Mon, 25 Mar 2013 21:19:16 +0000 (21:19 +0000)]
<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

11 years agoCorrect indentation. No functionality change.
Nick Lewycky [Mon, 25 Mar 2013 21:10:14 +0000 (21:10 +0000)]
Correct indentation. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177916 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoEmit an error message instead of crashing when dereferencing an incomplete pointer...
Bill Wendling [Mon, 25 Mar 2013 21:09:49 +0000 (21:09 +0000)]
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

11 years agoIR-gen should not generate an MMX types unless the code is explicitly using MMX
Chad Rosier [Mon, 25 Mar 2013 21:00:27 +0000 (21:00 +0000)]
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

11 years ago[analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset...
Anna Zaks [Mon, 25 Mar 2013 20:43:24 +0000 (20:43 +0000)]
[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

11 years agoAdded PR number for failing win64 tests.
Fariborz Jahanian [Mon, 25 Mar 2013 18:56:45 +0000 (18:56 +0000)]
Added PR number for failing win64 tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177886 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRe-add clang-format tests to clang/test.
Daniel Jasper [Mon, 25 Mar 2013 09:14:25 +0000 (09:14 +0000)]
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

11 years ago[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free...
Anton Yartsev [Mon, 25 Mar 2013 01:35:45 +0000 (01:35 +0000)]
[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

11 years ago[analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.
Jordan Rose [Sun, 24 Mar 2013 20:25:22 +0000 (20:25 +0000)]
[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

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sun, 24 Mar 2013 16:04:55 +0000 (16:04 +0000)]
Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177842 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReject -no-integrated-as on windows.
Rafael Espindola [Sun, 24 Mar 2013 15:06:53 +0000 (15:06 +0000)]
Reject -no-integrated-as on windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177840 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoGenerate metadata to implement the -cl-kernel-arg-info option.
Guy Benyei [Sun, 24 Mar 2013 13:58:12 +0000 (13:58 +0000)]
Generate metadata to implement the -cl-kernel-arg-info option.
OpenCL 1.2 spec. 5.7.3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177839 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDon't actually invoke codegen in driver test.
Benjamin Kramer [Sun, 24 Mar 2013 11:30:15 +0000 (11:30 +0000)]
Don't actually invoke codegen in driver test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177838 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake clang to mark static stack allocations with lifetime markers to enable a more...
Nadav Rotem [Sat, 23 Mar 2013 06:43:35 +0000 (06:43 +0000)]
Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.
Patch by John McCall with help by Shuxin Yang.
rdar://13115369

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177819 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert svn r176894 and r177658.
Bob Wilson [Sat, 23 Mar 2013 05:17:59 +0000 (05:17 +0000)]
Revert svn r176894 and r177658.

Changing -ccc-install-dir to affect cc1's resource-dir setting broke our
internal LNT tests. After discussing the situation with Jim, we've decided to
pursue an alternate approach. We really want the resource-dir to be located
relative to clang, even when using -ccc-install-dir, but we're going to
add a fallback setting for the libc++ headers if they don't exist alongside
the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177815 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUnder ARC, when we're passing the address of a strong variable
John McCall [Sat, 23 Mar 2013 02:35:54 +0000 (02:35 +0000)]
Under ARC, when we're passing the address of a strong variable
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.

rdar://13195034

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177813 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoStrip off local qualifiers when converting from RecordType to
Richard Trieu [Sat, 23 Mar 2013 01:38:36 +0000 (01:38 +0000)]
Strip off local qualifiers when converting from RecordType to
TemplateSpecializationType during template type diffing.  This allows the
correct printing of diffing qualifiers on templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177809 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Teach constraint managers about unsigned comparisons.
Jordan Rose [Sat, 23 Mar 2013 01:21:33 +0000 (01:21 +0000)]
[analyzer] Teach constraint managers about unsigned comparisons.

In C, comparisons between signed and unsigned numbers are always done in
unsigned-space. Thus, we should know that "i >= 0U" is always true, even
if 'i' is signed. Similarly, "u >= 0" is also always true, even though '0'
is signed.

Part of <rdar://problem/13239003> (false positives related to std::vector)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177806 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Loc-Loc operations (subtraction or comparison) produce a NonLoc.
Jordan Rose [Sat, 23 Mar 2013 01:21:29 +0000 (01:21 +0000)]
[analyzer] Loc-Loc operations (subtraction or comparison) produce a NonLoc.

For two concrete locations, we were producing another concrete location and
then casting it to an integer. We should just create a nonloc::ConcreteInt
to begin with.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177805 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] CmpRuns.py: Accept single files as input.
Jordan Rose [Sat, 23 Mar 2013 01:21:26 +0000 (01:21 +0000)]
[analyzer] CmpRuns.py: Accept single files as input.

This allows us to compare two direct invocations of the analyzer on a
single source file without having to wrap the output plists in their
own directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177804 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Also transform "a < b" to "(b - a) > 0" in the constraint manager.
Jordan Rose [Sat, 23 Mar 2013 01:21:23 +0000 (01:21 +0000)]
[analyzer] Also transform "a < b" to "(b - a) > 0" in the constraint manager.

We can support the full range of comparison operations between two locations
by canonicalizing them as subtraction, as in the previous commit.

This won't work (well) if either location includes an offset, or (again)
if the comparisons are not consistent about which region comes first.

<rdar://problem/13239003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177803 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd reverseComparisonOp and negateComparisonOp to BinaryOperator.
Jordan Rose [Sat, 23 Mar 2013 01:21:20 +0000 (01:21 +0000)]
Add reverseComparisonOp and negateComparisonOp to BinaryOperator.

...and adopt them in the analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177802 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Translate "a != b" to "(b - a) != 0" in the constraint manager.
Jordan Rose [Sat, 23 Mar 2013 01:21:16 +0000 (01:21 +0000)]
[analyzer] Translate "a != b" to "(b - a) != 0" in the constraint manager.

Canonicalizing these two forms allows us to better model containers like
std::vector, which use "m_start != m_finish" to implement empty() but
"m_finish - m_start" to implement size(). The analyzer should have a
consistent interpretation of these two symbolic expressions, even though
it's not properly reasoning about either one yet.

The other unfortunate thing is that while the size() expression will only
ever be written "m_finish - m_start", the comparison may be written
"m_finish == m_start" or "m_start == m_finish". Right now the analyzer does
not attempt to canonicalize those two expressions, since it doesn't know
which length expression to pick. Doing this correctly will probably require
implementing unary minus as a new SymExpr kind (<rdar://problem/12351075>).

For now, the analyzer inverts the order of arguments in the comparison to
build the subtraction, on the assumption that "begin() != end()" is
written more often than "end() != begin()". This is purely speculation.

<rdar://problem/13239003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177801 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Use SymExprs to represent '<loc> - <loc>' and '<loc> == <loc>'.
Jordan Rose [Sat, 23 Mar 2013 01:21:05 +0000 (01:21 +0000)]
[analyzer] Use SymExprs to represent '<loc> - <loc>' and '<loc> == <loc>'.

We just treat this as opaque symbols, but even that allows us to handle
simple cases where the same condition is tested twice. This is very common
in the STL, which means that any project using the STL gets spurious errors.

Part of <rdar://problem/13239003>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177800 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocumentation parsing: when providing code completion comment
Fariborz Jahanian [Sat, 23 Mar 2013 01:10:45 +0000 (01:10 +0000)]
documentation parsing: when providing code completion comment
for a getter used in property-dot syntax, if geter has its own
comment use it. // rdar://12791315

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177797 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Warn when a nil key or value are passed to NSMutableDictionary and ensure...
Anna Zaks [Sat, 23 Mar 2013 00:39:21 +0000 (00:39 +0000)]
[analyzer] Warn when a nil key or value are passed to NSMutableDictionary and ensure it works with subscripting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177789 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Correct the stale comment.
Anna Zaks [Sat, 23 Mar 2013 00:39:17 +0000 (00:39 +0000)]
[analyzer] Correct the stale comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177788 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIf a .syms file is available alongside a sanitizer runtime, pass it to the
Richard Smith [Sat, 23 Mar 2013 00:30:08 +0000 (00:30 +0000)]
If a .syms file is available alongside a sanitizer runtime, pass it to the
linker via --dynamic-list instead of using --export-dynamic. This reduces the
size of the dynamic symbol table, and thus of the binary (in some cases by up
to ~30%).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177783 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse RequireCompleteType() instead of isIncompleteType().
Bill Wendling [Fri, 22 Mar 2013 21:33:46 +0000 (21:33 +0000)]
Use RequireCompleteType() instead of isIncompleteType().

isIncompleteType() returns true or false for template types depending on whether
the type is instantiated yet. In this context, that's arbitrary. The better way
to check for a complete type is RequireCompleteType().

Thanks to Eli Friedman for noticing this!

<rdar://problem/12700799>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177768 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd test case for PR 12921.
Ted Kremenek [Fri, 22 Mar 2013 21:30:22 +0000 (21:30 +0000)]
Add test case for PR 12921.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177767 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago<rdar://problem/13479539> Only rebuild the global module cache when we're allowed to.
Douglas Gregor [Fri, 22 Mar 2013 21:26:48 +0000 (21:26 +0000)]
<rdar://problem/13479539> Only rebuild the global module cache when we're allowed to.

This eliminates excessive rebuilds of the global module cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177766 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "[analyzer] Break cycles (optionally) when trimming an ExplodedGraph."
Jordan Rose [Fri, 22 Mar 2013 21:15:33 +0000 (21:15 +0000)]
Revert "[analyzer] Break cycles (optionally) when trimming an ExplodedGraph."

The algorithm used here was ridiculously slow when a potential back-edge
pointed to a node that already had a lot of successors. The previous commit
makes this feature unnecessary anyway.

This reverts r177468 / f4cf6b10f863b9bc716a09b2b2a8c497dcc6aa9b.

Conflicts:

lib/StaticAnalyzer/Core/BugReporter.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177765 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Use a forward BFS instead of a reverse BFS to find shortest paths.
Jordan Rose [Fri, 22 Mar 2013 21:15:28 +0000 (21:15 +0000)]
[analyzer] Use a forward BFS instead of a reverse BFS to find shortest paths.

For a given bug equivalence class, we'd like to emit the report with the
shortest path. So far to do this we've been trimming the ExplodedGraph to
only contain relevant nodes, then doing a reverse BFS (starting at all the
error nodes) to find the shortest paths from the root. However, this is
fairly expensive when we are suppressing many bug reports in the same
equivalence class.

r177468-9 tried to solve this problem by breaking cycles during graph
trimming, then updating the BFS priorities after each suppressed report
instead of recomputing the whole thing. However, breaking cycles is not
a cheap operation because an analysis graph minus cycles is still a DAG,
not a tree.

This fix changes the algorithm to do a single forward BFS (starting from the
root) and to use that to choose the report with the shortest path by looking
at the error nodes with the lowest BFS priorities. This was Anna's idea, and
has the added advantage of requiring no update step: we can just pick the
error node with the next lowest priority to produce the next bug report.

<rdar://problem/13474689>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177764 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Fix test to actually test what was intended.
Jordan Rose [Fri, 22 Mar 2013 21:15:26 +0000 (21:15 +0000)]
[analyzer] Fix test to actually test what was intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177763 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[analyzer] Fix ExprEngine::ViewGraph to handle C++ initializers.
Jordan Rose [Fri, 22 Mar 2013 21:15:16 +0000 (21:15 +0000)]
[analyzer] Fix ExprEngine::ViewGraph to handle C++ initializers.

Debugging aid only, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177762 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[PCH/Modules] De/Serialize MacroInfos separately than MacroDirectives.
Argyrios Kyrtzidis [Fri, 22 Mar 2013 21:12:57 +0000 (21:12 +0000)]
[PCH/Modules] De/Serialize MacroInfos separately than MacroDirectives.

-Serialize the macro directives history into its own section
-Get rid of the macro updates section
-When de/serializing an identifier from a module, associate only one macro per
 submodule that defined+exported it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177761 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[modules] When a MacroInfo object is deserialized, allocate and store its submodule ID.
Argyrios Kyrtzidis [Fri, 22 Mar 2013 21:12:51 +0000 (21:12 +0000)]
[modules] When a MacroInfo object is deserialized, allocate and store its submodule ID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177760 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[ms-cxxabi] Implement member data pointers for non-dynamic classes
Reid Kleckner [Fri, 22 Mar 2013 19:02:54 +0000 (19:02 +0000)]
[ms-cxxabi] Implement member data pointers for non-dynamic classes

Summary:
For non-dynamic classes (no virtual bases), member data pointers are
simple offsets from the base of the record.  Dynamic classes use an
aggregate for member data pointers and are therefore currently
unsupported.

Unlike Itanium, the ms ABI uses 0 to represent null for polymorphic
classes.  Non-polymorphic classes use -1 like Itanium, since 0 is a
valid field offset.

Reviewers: rjmccall

CC: timurrrr, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D558

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177753 91177308-0d34-0410-b5e6-96231b3b80d8