Commit Graph

68504 Commits

Author SHA1 Message Date
Douglas Gregor 9bfc2e50a7 In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.
llvm-svn: 82576
2009-09-22 21:41:40 +00:00
Ted Kremenek 3003001a86 Fix: <rdar://problem/7242006> [RegionStore] compound literal assignment with floats not honored
llvm-svn: 82575
2009-09-22 21:19:14 +00:00
Erick Tryzelaar 21e83eab3f Add examples for Kaleidoscope chapters 2 through 6.
Conflicts:

	examples/Makefile

llvm-svn: 82574
2009-09-22 21:15:19 +00:00
Erick Tryzelaar 2d8813cfb0 Rename Kaleidoscope to show that it's for Chapter 7 of the tutorial.
llvm-svn: 82573
2009-09-22 21:15:00 +00:00
Erick Tryzelaar 6e2b34bc14 Sync c++ kaleidoscope tutorial with test.
llvm-svn: 82572
2009-09-22 21:14:49 +00:00
Douglas Gregor ea9b03e6e2 Replace the -code-completion-dump option with
-code-completion-at=filename:line:column

which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.

llvm-svn: 82571
2009-09-22 21:11:38 +00:00
Devang Patel 320a1c4083 Add SetLocation() to allow IRBuilder user to set location info for an instruction already created.
llvm-svn: 82570
2009-09-22 20:56:31 +00:00
Devang Patel 276b02b325 Check exisiting dbg MDKind first.
llvm-svn: 82568
2009-09-22 20:54:13 +00:00
Anders Carlsson 1d3b6f62df CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.
llvm-svn: 82567
2009-09-22 20:33:31 +00:00
Fariborz Jahanian f0647a5fbc Code refactoring and cleanup.
llvm-svn: 82566
2009-09-22 20:24:30 +00:00
Fariborz Jahanian 0b51c729c9 Issue good ambiguity diagnostic when convesion fails.
llvm-svn: 82565
2009-09-22 19:53:15 +00:00
Steve Naroff 66af1aecdb - Implement support for various types of "refs" (initially to help test clang_getCursor()).
- Add missing prototypes for dispose functions.

llvm-svn: 82564
2009-09-22 19:25:29 +00:00
Anders Carlsson 55640546e4 If we already set a primary base, don't set it to the first nearly empty base class.
llvm-svn: 82563
2009-09-22 19:16:59 +00:00
Anders Carlsson 3dc237390f Fix speling error.
llvm-svn: 82562
2009-09-22 19:15:56 +00:00
Victor Hernandez ddc2ce4fe2 No need to verify that malloc's return type is i8*.
llvm-svn: 82561
2009-09-22 18:50:03 +00:00
Anders Carlsson 96cff1fc10 Explicitly initialize the PrimaryBase and PrimaryBaseWasVirtual members.
llvm-svn: 82560
2009-09-22 18:21:58 +00:00
Mike Stump 865715442e Yes.
llvm-svn: 82559
2009-09-22 17:38:02 +00:00
Anders Carlsson e7ceb85b0d (With Doug's help) fix a crash in the code completion code that lead to a test failure.
llvm-svn: 82558
2009-09-22 17:29:51 +00:00
Anders Carlsson fc51cc968b Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
llvm-svn: 82557
2009-09-22 17:23:30 +00:00
Fariborz Jahanian e983d17570 Fix a regression in accessing class getter using the dot-syntax
notation. There is still an issue accessing field of a 'Class''s isa
in legacy code using dot field access notation (as noted in the test case)
but unrelated to this patch.

llvm-svn: 82555
2009-09-22 16:48:37 +00:00
David Goodwin 74b79566f6 Use early returns.
llvm-svn: 82554
2009-09-22 16:47:52 +00:00
Daniel Dunbar 7e3aa3f68c Revert "Don't allow formatted_ostream to be unbuffered, even if its underlying
buffer", while we work out a solution.

Dan convinced me that making debugging annoying for him is worse than 10x being
slower for me. :)

llvm-svn: 82553
2009-09-22 16:33:42 +00:00
Daniel Dunbar b2942cb5cb ... missed hiding a variable for MSVC only.
llvm-svn: 82552
2009-09-22 16:10:35 +00:00
Daniel Dunbar 1bdedd3876 Hide MSVC specific CRT interaction behind _MSC_VER.
llvm-svn: 82551
2009-09-22 15:58:35 +00:00
Douglas Gregor cabea40ea3 Implement code completion within a function call, triggered after the
opening parentheses and after each comma. We gather the set of visible
overloaded functions, perform "partial" overloading based on the set
of arguments that we have thus far, and return the still-viable
results sorted by the likelihood that they will be the best candidate.

Most of the changes in this patch are a refactoring of the overloading
routines for a function call, since we needed to separate out the
notion of building an overload set (common to code-completion and
normal semantic analysis) and then what to do with that overload
set. As part of this change, I've pushed explicit template arguments
into a few more subroutines.

There is still much more work to do in this area. Function templates
won't be handled well (unless we happen to deduce all of the template
arguments before we hit the completion point), nor will overloaded
function-call operators or calls to member functions.

llvm-svn: 82549
2009-09-22 15:41:20 +00:00
Mikhail Glushenkov 88e98fec70 Remove the GetProcessId() call from Win32/Program.inc, take 2.
GetProcessId() was introduced only in Windows XP, and we want to support earlier
versions.

llvm-svn: 82548
2009-09-22 15:40:32 +00:00
Daniel Dunbar 86707c9913 Fix commento.
llvm-svn: 82544
2009-09-22 10:30:34 +00:00
Daniel Dunbar e22adaebf5 Spell function pointer correctly.
llvm-svn: 82543
2009-09-22 10:19:04 +00:00
Daniel Dunbar 79327b6efe Always execute tests internally on Windows.
llvm-svn: 82542
2009-09-22 10:08:03 +00:00
Daniel Dunbar 3967fca364 CMake: Add a clang-c++tests target for running the experimental C++ header
-fsyntax-only'ing tests.

llvm-svn: 82541
2009-09-22 10:07:55 +00:00
Daniel Dunbar 95d5a1d240 Add safe part of previous (reverted) commit, necessary to update to LLVM API change.
llvm-svn: 82540
2009-09-22 10:06:21 +00:00
Daniel Dunbar b879c3c125 Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.
llvm-svn: 82539
2009-09-22 10:03:52 +00:00
Daniel Dunbar 99e1174baf lit: When executing shell scripts internally, don't allow piped stderr on any
commands except the last one, instead redirect the stderr to a temporary
file. This sidesteps a potential deadlocking issue.

llvm-svn: 82538
2009-09-22 09:50:38 +00:00
Daniel Dunbar 4c7b0ca05b Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.
Also, tweak the 'lit' test runner to set this variable unconditionally.

llvm-svn: 82537
2009-09-22 09:50:28 +00:00
Evan Cheng 0570bbbd0f Forgot this.
llvm-svn: 82536
2009-09-22 08:47:59 +00:00
Evan Cheng 08d1e41c10 Fix PR5024. LiveVariables::FindLastPartialDef should return a set of sub-registers that were defined by the last partial def, not just a single sub-register.
llvm-svn: 82535
2009-09-22 08:34:46 +00:00
Daniel Dunbar 28830b39b4 Initial support for running LLVM tests from cmake.
llvm-svn: 82534
2009-09-22 07:38:44 +00:00
Daniel Dunbar 26a6dfe0b6 Generate lit.site.cfg from a .in file, as clang does.
llvm-svn: 82533
2009-09-22 07:38:33 +00:00
Daniel Dunbar 1a0a423b38 Use Compiler.h macro instead of __attribute__.
llvm-svn: 82532
2009-09-22 07:38:23 +00:00
Daniel Dunbar 6ce1ab1c64 CMake: Fix definition of LTDL_SHLIB_EXT for Darwin.
llvm-svn: 82530
2009-09-22 06:09:37 +00:00
Daniel Dunbar a249c42e8c Fix llvm-config --src-root and --obj-root for CMake builds.
llvm-svn: 82529
2009-09-22 06:09:31 +00:00
Daniel Dunbar af890eb82f llvm-config: Remove unused variables.
llvm-svn: 82528
2009-09-22 06:09:22 +00:00
Daniel Dunbar b8895c078f Actually use the arguments with the resolved executable path.
llvm-svn: 82527
2009-09-22 06:09:13 +00:00
Daniel Dunbar b45012dcde Update PCH serialization of FunctionDecl flags.
llvm-svn: 82526
2009-09-22 05:38:14 +00:00
Daniel Dunbar 2d925ebd0a Allow PCH files to be read from stdin.
llvm-svn: 82525
2009-09-22 05:38:01 +00:00
Daniel Dunbar b5cbf77c2e Remove old test runner, this has moved to LLVM/utils/lit and all known clients
have been updated.
 - Please let me know of any problems.

llvm-svn: 82524
2009-09-22 05:16:02 +00:00
Ted Kremenek f9539d0c3f Fix: <rdar://problem/7242015> [RegionStore] variable passed-by-reference (via integer) to function call not invalidated
llvm-svn: 82523
2009-09-22 04:48:39 +00:00
Daniel Dunbar 7b446a001d Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
ExecuteAndWait.

llvm-svn: 82522
2009-09-22 04:44:56 +00:00
Daniel Dunbar 24a0813fc4 lit: Don't use close_fds=True on Windows.
llvm-svn: 82521
2009-09-22 04:44:37 +00:00
Daniel Dunbar 753f8be411 lit: When executing commands internally, perform PATH resolution ourselves.
llvm-svn: 82520
2009-09-22 04:44:26 +00:00