Commit Graph

45105 Commits

Author SHA1 Message Date
Adrian Prantl 7e2b05c378 Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r180815)

rdar://problem/13658587

llvm-svn: 180817
2013-04-30 22:17:36 +00:00
Chad Rosier 357672316b [driver] Allow multiple -arch options with -save-temps by adding the arch name
to the temporary files.
rdar://13218604

llvm-svn: 180813
2013-04-30 22:01:21 +00:00
Jordan Rose 38c97d2642 [analyzer] scan-build: support -enable-checker with new Xcode integration.
<rdar://problem/13772094>

llvm-svn: 180812
2013-04-30 22:00:04 +00:00
Richard Smith e6c878c0c6 Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.
Original commit message:

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>

llvm-svn: 180809
2013-04-30 21:34:13 +00:00
Richard Smith 061f1e21be When deducing an 'auto' type, don't modify the type-as-written.
llvm-svn: 180808
2013-04-30 21:23:01 +00:00
Reid Kleckner 700c3eea1e [ms-cxxabi] Implement member pointer comparisons
Summary:
Like Itanium, comparisons are basically bitwise comparisons of the two
values, with an exception for null member function pointers.  If two
function pointers are null, only the function pointer field matters for
comparison purposes.  The rest of the bits can be arbitrary.  We take
advantage of this in isZeroInitializable(), and it may matter once we
start emitting conversions.

Reviewers: rjmccall

CC: cfe-commits

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

llvm-svn: 180800
2013-04-30 20:15:14 +00:00
Manman Ren e36d3416ab Struct-path aware TBAA: enable struct-path aware TBAA for classes.
llvm-svn: 180795
2013-04-30 17:38:09 +00:00
Richard Smith 27d807cc9c Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.

llvm-svn: 180789
2013-04-30 13:56:41 +00:00
Rafael Espindola 6d3709430f Use {{.*}}suffix instead of [[TC]] in places where we print the toolchain
path with /. This matches linux-ld.c and should finish fixing this test on
windows.

llvm-svn: 180786
2013-04-30 13:08:15 +00:00
Rafael Espindola 34cfafde9d Always use / when computing mips specific paths.
We were getting paths with both / and \ in them. This should fix mips-cs-ld.c
on the windows bots.

llvm-svn: 180783
2013-04-30 12:24:40 +00:00
Simon Atanasyan 036d16d916 [Mips] Pass -mips16, -mmicromips, -mdsp and -mdspr2 flags to the
assembler.

llvm-svn: 180775
2013-04-30 07:47:13 +00:00
Ted Kremenek 44a28091cf Place bitfield -Wconstant-conversion warning into subgroup called -Wbitfield-constant-conversion.
This is to just allow more precise diagnostic control.

Implements <rdar://problem/13766026>.

llvm-svn: 180773
2013-04-30 07:10:22 +00:00
Daniel Jasper 9ba6f9bcc5 Fix very confusing indent in Sema.cpp.
This came up during my Euro LLVM 2013 talk on clang-format and I was
asked to submit it :-).

llvm-svn: 180772
2013-04-30 06:43:16 +00:00
Argyrios Kyrtzidis d48b91dbbe [PCH] Fix memory leak related to deserialized MacroInfo objects.
Deserialized MacroInfos were not destroyed and if their SmallVector did heap allocation,
it was leaked.

rdar://13768967

llvm-svn: 180771
2013-04-30 05:05:35 +00:00
Joerg Sonnenberger 428ef1e368 Add support for -stdlib=libc++ in the NetBSD toolchain.
llvm-svn: 180766
2013-04-30 01:21:43 +00:00
Fariborz Jahanian 3beec2080f Objective-C (mostly arc): Under ARC, we often have unneeded qualifiers
in the diagnostics. Remove them when reporting incompatible
Objective-C pointer types. // rdar://13752880.

llvm-svn: 180765
2013-04-30 00:30:48 +00:00
Bill Wendling 219df4c0af Modify triple to try to make it pass on ARM.
llvm-svn: 180748
2013-04-29 23:14:24 +00:00
Ted Kremenek b6be1e017c Just use std::list<> for PathPieces instead of complicated use of ilist.
llvm-svn: 180747
2013-04-29 23:13:02 +00:00
Ted Kremenek eba09facff Revert "[analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces."
Jordan rightly pointed out that we can do the same with std::list.

llvm-svn: 180746
2013-04-29 23:12:59 +00:00
Ted Kremenek 03ae57b5af [analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces.
Much of this patch outside of PathDiagnostics.h are just minor
syntactic changes due to the return type for operator* and the like
changing for the iterator, so the real focus should be on
PathPieces itself.

This change is motivated so that we can do efficient insertion
and removal of individual pieces from within a PathPiece, just like
this was a kind of "IR" for static analyzer diagnostics.  We
currently implement path transformations by iterating over an
entire PathPiece and making a copy.  This isn't very natural for
some algorithms.

We use an ilist here instead of std::list because we want operations
to rip out/insert nodes in place, just like IR manipulation.  This
isn't being used yet, but opens the door for more powerful
transformation algorithms on diagnostic paths.

llvm-svn: 180741
2013-04-29 22:38:26 +00:00
Ted Kremenek 518e781256 [analyzer] Remove comparePath's dependency on subscript operator.
llvm-svn: 180740
2013-04-29 22:38:22 +00:00
Bill Wendling 96a77693be Emit the TLS intialization functions into a list.
Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>

llvm-svn: 180739
2013-04-29 22:27:16 +00:00
Fariborz Jahanian 4289a5a429 c language: diagnose use of "[*]" on any array dimension
in the parameter of a function definition. Currently,
it crashes in irgen if it is on other than the 1st dimension.
// rdar://13705391

llvm-svn: 180732
2013-04-29 22:01:25 +00:00
Rafael Espindola 51629dfce2 Use ArrayRef in AddMethodCandidate.
Patch by Robert Wilhelm!

llvm-svn: 180724
2013-04-29 19:29:25 +00:00
Argyrios Kyrtzidis f97290bb53 [test] add missing header for the test.
llvm-svn: 180719
2013-04-29 17:31:48 +00:00
Argyrios Kyrtzidis c3b4b79beb When emitting a preprocessed file with implicit module imports, make sure line directives are emitted in the next line.
rdar://13722737

llvm-svn: 180718
2013-04-29 17:26:22 +00:00
Jordan Rose 63524b9453 [analyzer] scan-view: don't ever serve absolute paths.
At one point in time scan-view allowed absolute paths to reference files
within the server root, but this doesn't seem to be used anymore, and
caused problems if a server-root-relative path actually matched an
absolute path to an existing file. This patch just treats paths as
server-root-relative all the time.

PR15843

llvm-svn: 180715
2013-04-29 17:23:06 +00:00
Jordan Rose 49f888bbab Revert "[analyzer] Model casts to bool differently from other numbers."
This seems to be causing quite a slowdown on our internal analyzer bot,
and I'm not sure why. Needs further investigation.

This reverts r180638 / 9e161ea981f22ae017b6af09d660bfc3ddf16a09.

llvm-svn: 180714
2013-04-29 17:23:03 +00:00
Fariborz Jahanian d56a262200 Fix a typo in a parse assert.
Patch by Alex Denisov.

llvm-svn: 180712
2013-04-29 15:35:35 +00:00
Ben Langmuir e7d7c4cfc2 Small CapturedStmt improvements
Add a CapturedStmt.h similar to Lambda.h to reduce the typing required to get
to the CapturedRegionKind enum. This also allows codegen to access this enum
without including Sema/ScopeInfo.h.

Also removes some duplicated code for capturing 'this' between CapturedStmt and
Lambda.

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

llvm-svn: 180710
2013-04-29 13:32:41 +00:00
Ben Langmuir 2e13dd612d Test commit
llvm-svn: 180709
2013-04-29 13:07:42 +00:00
Richard Smith c8378952fb Keep the parser's template depth up to date when parsing local templates and
late-parsed templates. Patch by Faisal Vali!

llvm-svn: 180708
2013-04-29 11:55:38 +00:00
Richard Smith ad5c1ca44d Implement DR580: access checks for template parameters of a class template are
performed within the context of that class template. Patch by Ismail Pazarbasi!

llvm-svn: 180707
2013-04-29 10:13:55 +00:00
Richard Smith 07cea1911a Properly reenter multiple contexts when parsing a late-parsed function template
within a dependent context. Patch by Will Wilson (+clang-format)!

llvm-svn: 180702
2013-04-29 08:53:40 +00:00
Richard Smith a3519fa347 Fix an assertion failure / accepts-invalid in -fms-extensions mode. Don't build
a dependent-scope id expression when a templated member function of a
non-templated class references an unknown identifier, since instantiation won't
rebuild it (and we can tell at parse time that it'll never work). Based on a
patch by Faisal Vali!

llvm-svn: 180701
2013-04-29 08:45:27 +00:00
Dmitri Gribenko e5fde996dc ArrayRef'ize Sema::ActOnEnumBody. No functionality change.
Patch by Robert Wilhelm.

llvm-svn: 180682
2013-04-27 20:23:52 +00:00
Dmitri Gribenko b8f9f3ef0b Documentation: Change UTF-8 ellipsis character to ASCII ... sequence
Patch by Dimitry Andric

llvm-svn: 180674
2013-04-27 16:26:29 +00:00
Benjamin Kramer 34463cf41d Silence a silly sign compare warning from GCC.
llvm-svn: 180673
2013-04-27 15:07:53 +00:00
Dmitri Gribenko d3c5a51e9d Documentation: add an idea for a cpp14-migrate transform for N3421
llvm-svn: 180672
2013-04-27 13:41:02 +00:00
Benjamin Kramer 85f5aa1e6d Exit early when $PWD isn't set. Remove unused unistd.h include.
llvm-svn: 180670
2013-04-27 08:42:33 +00:00
Benjamin Kramer 698d7c86f0 Use LLVM's preferred current_path API instead of calling getcwd(3) directly.
The existing code also failed to allocate a buffer for it so getcwd corrupted
the stack. sys::fs::current_path takes care of the memory management.

llvm-svn: 180669
2013-04-27 08:12:29 +00:00
Chad Rosier 1675c0e6e3 [driver] Revert r180652 and 180658 and temporarily #define MAXPATHLEN to
make the gdb tests and the Windows bots happy.

The Path::GetCurrentDirectory API is not equivalent to ::getcwd(), so 
r180652 causes a gdb tests to fail.  On the other hand, <sys/param.h> 
isn't defined on Windows systems, so that causes Windows builds to fail.
rdar://12237559

llvm-svn: 180661
2013-04-27 01:14:43 +00:00
Chad Rosier df001f7fb2 Fix the dangling pointer.
llvm-svn: 180658
2013-04-27 00:57:18 +00:00
Manman Ren 0e52166bed Struct-path aware TBAA: fix handling of may_alias attribute.
llvm-svn: 180656
2013-04-27 00:39:37 +00:00
Manman Ren a6b7303e4c Struct-path aware TBAA: change the format of TBAAStructType node.
We switch the order of offset and field type to make TBAAStructType node
(name, parent node, offset) similar to scalar TBAA node (name, parent node).

llvm-svn: 180653
2013-04-27 00:26:07 +00:00
Chad Rosier 5a8341d6be [driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the Windows
bots recover.
rdar://12237559

llvm-svn: 180652
2013-04-27 00:11:10 +00:00
Argyrios Kyrtzidis 04703a6efd Fix an assertion hit in Sema::CheckObjCMethodOverrides.
llvm-svn: 180651
2013-04-27 00:10:12 +00:00
Fariborz Jahanian 5a2e4a2dc1 documenttion parsing. Provide a c-index test
and limit comment extraction to public c++
bases. // rdar://13647476

llvm-svn: 180646
2013-04-26 23:34:36 +00:00
Sean Callanan 969c5bd2d8 In the ASTImporter, when checking whether two
structs are compatible, check whether the fields
of the structs have the same name.  This prevents
erroneous coalescing of (in particular) anonymous
structs.

llvm-svn: 180644
2013-04-26 22:49:25 +00:00
Argyrios Kyrtzidis 12fdb9e34b [libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.
rdar://13743084

llvm-svn: 180643
2013-04-26 22:47:49 +00:00