Commit Graph

134629 Commits

Author SHA1 Message Date
Alexey Samsonov 298e237d7e [ASan] Add extern C for __asan_symbolize on Windows
llvm-svn: 165003
2012-10-02 12:35:42 +00:00
Axel Naumann 2bd39fd2de Enable programmatic provisioning of virtual module.map files (instead of writing out actual module.map files).
Opens up the wonders of clang::Modules to tools - though they remain as experimental as before.

llvm-svn: 165002
2012-10-02 12:26:36 +00:00
Axel Naumann d9a25b3c17 Only those InterestingDecls that got added to the AST should be passed to the ASTConsumer.
llvm-svn: 165001
2012-10-02 12:18:46 +00:00
Alexey Samsonov e29c6731aa [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.
llvm-svn: 165000
2012-10-02 12:11:17 +00:00
Dmitry Vyukov a2c1c7a78e tsan: wait for pending reports before exit
llvm-svn: 164999
2012-10-02 12:07:16 +00:00
Dmitry Vyukov 27d5b37c38 tsan: output tid's in reports
llvm-svn: 164998
2012-10-02 11:52:05 +00:00
Dmitry Vyukov 0c40a5600c tsan: run output tests in parallel
llvm-svn: 164997
2012-10-02 11:51:40 +00:00
James Molloy 77639e2c72 Add default JIT LIT variable.
Patch by David Tweed!

llvm-svn: 164996
2012-10-02 10:57:08 +00:00
Benjamin Kramer e42d406105 -arch is a darwin-specific driver feature, use a triple instead in rewriter test.
llvm-svn: 164995
2012-10-02 09:42:36 +00:00
Benjamin Kramer 4bb04704f3 Force triple in test to unbreak it on non-darwin platforms.
llvm-svn: 164994
2012-10-02 09:29:48 +00:00
Axel Naumann 63469422c4 Merge pending instantiations instead of overwriting existing ones.
Check whether a pending instantiation needs to be instantiated (or whether an instantiation already exists).
Verify the size of the PendingInstantiations record (was only checking size of existing PendingInstantiations).

Migrate Obj-C++ part of redecl-merge into separate test, now that this is growing.
templates.mm: test that CodeGen has seen exactly one definition of template instantiations.
redecl-merge.m: use "@" specifier for expected-diagnostics.

llvm-svn: 164993
2012-10-02 09:09:43 +00:00
Bill Wendling 7e5ef83cdb Use an environment variable instead of what's in the make cmd goals.
llvm-svn: 164992
2012-10-02 06:19:15 +00:00
Greg Clayton 548e9a3e61 <rdar://problem/11791234>
Shared libraries on MacOSX were not properly being removed from the shared
module list when re-running a debug session due to an error in:

Module::MatchesModuleSpec()

llvm-svn: 164991
2012-10-02 06:04:17 +00:00
Ted Kremenek 2f88c40ded Tweak diagnostic text to indicate that __weak on a local variable is only allowed
for ARC.  Fixes <rdar://problem/12407705>

llvm-svn: 164990
2012-10-02 05:36:02 +00:00
Lang Hames 5de91cc35f Add FP_CONTRACT support for clang.
Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).

llvm-svn: 164989
2012-10-02 04:45:10 +00:00
Ted Kremenek b67c6cc24d Check if an IdentifierInfo* is null when the FunctionDecl isn't a simple C function.
Fixes <rdar://problem/12355298>

llvm-svn: 164988
2012-10-02 04:36:54 +00:00
Chandler Carruth 01f63b950c Re-enable this test to reflect re-enabling the new SROA pass.
llvm-svn: 164987
2012-10-02 04:24:16 +00:00
Chandler Carruth 4e4359935b Turn the new SROA pass back on. Let's see if it sticks this time. =]
Again, let me know if anything breaks due to this!

llvm-svn: 164986
2012-10-02 04:24:01 +00:00
Jason Molenda 68b3607fa2 Handle KASLR kernel loading for kernel corefiles.
Reduce the amount of output that DynamicLoaderDarwinKernel
prints for each kext it loads.
<rdar://problem/7714201> 

llvm-svn: 164985
2012-10-02 03:49:41 +00:00
Jordan Rose 3c14b2339d -Wformat: Don't check format strings in uninstantiated templates.
Also applies to -Wnonnull, -Wtype-safety, and -Wnon-pod-varargs.
All of these can be better checked at instantiation time.

This change does not actually affect regular CallExpr function calls,
since the checks there only happen after overload resolution.
However, it will affect Objective-C method calls.

<rdar://problem/12373934>

llvm-svn: 164984
2012-10-02 01:49:54 +00:00
Chad Rosier 380a74a339 Fix 80-column violations. Cleanup whitespace in generated code.
llvm-svn: 164983
2012-10-02 00:25:57 +00:00
NAKAMURA Takumi 5d62a7c5bb clang/test/Index: Fix two tests. Both %S and %t are expanded to absolute paths.
llvm-svn: 164982
2012-10-02 00:11:53 +00:00
Hemant Kulkarni 08e410293f Emit symbol tables.
Reorganize to derive all sections from SectionChunk.
Construct section table header from SectionChunk.

llvm-svn: 164981
2012-10-01 23:53:20 +00:00
Chad Rosier bb90c414c4 [ms-inline asm] Use the convertToMapAndConstraints() function in the front-end.
Rework the logic to account for the fact that we no longer create a MCInst.

llvm-svn: 164980
2012-10-01 23:45:59 +00:00
Chad Rosier f4e35dc672 [ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands.  This replaces the
getMCInstOperandNum() function.

The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.

llvm-svn: 164979
2012-10-01 23:45:51 +00:00
Michael Gottesman 101290bcef [clang-tests] Changed relative paths to absolute paths in run command for annotate-macro-args.m, get-cursor-macro-args.m, import_self.c.
This fixes make check-all failures when make -C is used to run the tests.

llvm-svn: 164978
2012-10-01 23:39:44 +00:00
Fariborz Jahanian e2a9d42297 Modern translator test. Breakup test into two and
skip the x86_64 version for mingw32 and win32.

llvm-svn: 164977
2012-10-01 23:25:52 +00:00
Sid Manning e861d43f65 This change:
* Updates ReaderELF.cpp contentType method to match ELF.h's logic and now handle
    typeData
  * Add -arch to ldd-core testdriver
  * Add testcase to check typeData
  * Update others to stay in sync with this change.

llvm-svn: 164976
2012-10-01 23:23:05 +00:00
NAKAMURA Takumi 1d24e56bad test/CodeGen/X86/red-zone2.ll: Add -mtriple=x86_64-linux, and FileCheck-ize.
llvm-svn: 164975
2012-10-01 22:48:07 +00:00
Jim Grosbach 745c52dd4e MachO: direct-to-object attribute for data-in-code markers.
The target backend can support data-in-code load commands even when
the assembler doesn't, or vice-versa. Allow targets to opt-in for
direct-to-object.

PR13973.

llvm-svn: 164974
2012-10-01 22:20:54 +00:00
Enrico Granata 83c85e4193 <rdar://problem/12349509> Renaming the structure that we use for NSDictionary children
llvm-svn: 164973
2012-10-01 21:49:10 +00:00
Reed Kotler 1a93ccc889 checking test case for r164811. was an omission to not check this in. this was already approved
llvm-svn: 164972
2012-10-01 21:35:06 +00:00
Fariborz Jahanian 40b169ec68 Rename a test I just added.
llvm-svn: 164971
2012-10-01 21:21:50 +00:00
Fariborz Jahanian 572cc970fb objective-C modern translator. Test for producing both
32bit and 64bit version of modern translator.
// rdar://12189793

llvm-svn: 164970
2012-10-01 20:55:56 +00:00
Chad Rosier f7102969e2 [ms-inline asm] Expose the getReg() function in the base class.
llvm-svn: 164969
2012-10-01 20:53:03 +00:00
Richard Smith cdd1da209d Fix treatment of case which came up on std-proposals@: 'void' is permitted in core constant expressions, despite not being a literal type.
llvm-svn: 164968
2012-10-01 20:36:17 +00:00
Richard Smith 1620ebd98f PR13978: A 'decltype' DeclSpec has an expression representation, not a type
representation. Fix crash if it appears in the return type of a member function
definition.

llvm-svn: 164967
2012-10-01 20:35:07 +00:00
Anna Zaks 97c7ce3368 Move isObjCSelf into Expr.
llvm-svn: 164966
2012-10-01 20:34:04 +00:00
Anna Zaks bfacf17b8b [analyzer] Address Jordan's review for r164868.
llvm-svn: 164965
2012-10-01 20:33:58 +00:00
Michael J. Spencer 99a241fa2c [Docs] Update File Headers section to cover doxygen style file level docs.
llvm-svn: 164964
2012-10-01 19:59:21 +00:00
Fariborz Jahanian a3102b9cde Add xml test for availability to comment-xml-schema.c
llvm-svn: 164961
2012-10-01 19:10:40 +00:00
Jordan Rose 92375adafb [analyzer] Allow ObjC ivar lvalues where the base is nil.
By analogy with C structs, this seems to be legal, if probably discouraged.
It's only if the ivar is read from or written to that there's a problem.
Running a program that gets the "address" of an instance variable does in
fact return the offset when the base "object" is nil.

This isn't a full revert because r164442 includes some diagnostic tweaks
as well; those have been kept.

This partially reverts r164442 / 08965091770c9b276c238bac2f716eaa4da2dca4.

llvm-svn: 164960
2012-10-01 19:07:22 +00:00
Jordan Rose 28c06b268e [analyzer] Add a test for PR13927 "offsetof replacement flagged as null deref"
This seems to be legal according to C11 6.5.3.2.

No functionality change.

llvm-svn: 164959
2012-10-01 19:07:19 +00:00
Jordan Rose 12024f8776 Revert "[analyzer] Check that a member expr is valid even when the result is an lvalue."
The original intent of this commit was to catch potential null dereferences
early, but it breaks the common "home-grown offsetof" idiom (PR13927):

 (((struct Foo *)0)->member - ((struct foo *)0))

As it turns out, this appears to be legal in C, per a footnote in
C11 6.5.3.2: "Thus, &*E is equivalent to E (even if E is a null pointer)".
In C++ this issue is still open:
  http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#232

We'll just have to make sure we have good path notes in the future.

This reverts r164441 / 9be016dcd1ca3986873a7b66bd4bc027309ceb59.

llvm-svn: 164958
2012-10-01 19:07:15 +00:00
Fariborz Jahanian c491c3f27a availability in structured documents. Takes
care of comments by Dimitri and Doug.

llvm-svn: 164957
2012-10-01 18:42:25 +00:00
Jordan Rose 3c837abd2b Re-enable support for --program-prefix.
The Apple buildbots have been modified not to pass --target,
so they shouldn't choke on a default program prefix anymore.

Patch by Rick Foos!

llvm-svn: 164956
2012-10-01 18:40:32 +00:00
Ted Kremenek 4a5b35eeec Have AnalyzerOptions::getBooleanOption() stick the matching config
string in the config table so that it can be dumped as part of the 
config dumper.  Add a test to show that these options are sticking
and can be cross-checked using FileCheck.

llvm-svn: 164954
2012-10-01 18:28:19 +00:00
Ted Kremenek 86917fdbe0 Add checker debug.ConfigDumper to dump the contents of the configuration table.
The format of this output is a WIP; largely I'm bringing it up now
for regression testing.  We can evolve the output format over time.

llvm-svn: 164953
2012-10-01 18:28:14 +00:00
Jordan Rose 88dd13fdca Reapply "[analyzer] Handle inlined constructors for rvalue temporaries correctly."
This is related to but not blocked by <rdar://problem/12137950>
("Return-by-value structs do not have associated regions")

This reverts r164875 / 3278d41e17749dbedb204a81ef373499f10251d7.

llvm-svn: 164952
2012-10-01 17:51:35 +00:00
Richard Trieu 3267347cca Cleaning up the self initialization checker.
-Allow Sema to do more processing on the initial Expr before checking it.
-Remove the special conditions in HandleExpr()
-Move the code so that only one call site is needed.
-Removed the function from Sema and only call it locally.
-Warn on potentially evaluated reference variables, not just casts to r-values.
-Update tests.

llvm-svn: 164951
2012-10-01 17:39:51 +00:00