Commit Graph

26124 Commits

Author SHA1 Message Date
Eli Friedman 36ebbec121 PR8325: don't do destructor checking when a pointer is thrown.
llvm-svn: 116336
2010-10-12 20:32:36 +00:00
John McCall 036855a0ed Enter the context of the declared function template when performing
deduction and the final substitution, but not while substituting the
explicit template arguments.  Fixes rdar://problem/8537391

llvm-svn: 116332
2010-10-12 19:40:14 +00:00
Douglas Gregor 6e9cf630f8 When finalizing a function template specialization following template
argument deduction, make sure to check the correctness of deduced template
type arguments (which we had previously skipped) along with other
kinds of template arguments. This fixes part of PR6784, but we're
still swallowing the extension warning about unnamed/local template
arguments.

llvm-svn: 116327
2010-10-12 18:51:08 +00:00
Douglas Gregor 758cb67fcf If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.

llvm-svn: 116324
2010-10-12 18:23:32 +00:00
Chris Lattner 17c0eac879 fix PR7885, rejecting invalid uses of __builtin_constant_p.
llvm-svn: 116317
2010-10-12 17:47:42 +00:00
Nick Lewycky 8d3a1783ba Replace \r\n with \n in this file.
llvm-svn: 116312
2010-10-12 16:46:35 +00:00
Douglas Gregor efc469587a Parse default arguments within member functions in source order, from
Manuel Klimek! Fixes PR7715.

llvm-svn: 116311
2010-10-12 16:25:54 +00:00
Duncan Sands 38b918c0cf Pacify gcc-4.4.
llvm-svn: 116300
2010-10-12 14:07:59 +00:00
John McCall 73d3618223 C's comma operator performs lvalue conversion on both its operands;
require them to have complete types.

llvm-svn: 116297
2010-10-12 07:14:40 +00:00
John McCall 5627fd71c8 Flesh out test.
llvm-svn: 116292
2010-10-12 03:38:33 +00:00
John McCall 01cbf2de0f I just do what the comments tell me to do.
llvm-svn: 116289
2010-10-12 02:19:57 +00:00
Chris Lattner 18d853794f fix the definition of __builtin_constant_p, the first arg isn't a short.
Patch by the "pax team"

llvm-svn: 116288
2010-10-12 02:16:39 +00:00
John McCall 36226621f6 Progress.
llvm-svn: 116287
2010-10-12 02:09:17 +00:00
Francois Pichet 85e6da1f19 This patch remove the Win32 XFAIL from remap-complete.c
The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.

llvm-svn: 116286
2010-10-12 01:01:43 +00:00
Douglas Gregor 7bb8af613c When we load an ASTUnit from command-line arguments, hold on to the
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.

Fixes <rdar://problem/7595339>.

llvm-svn: 116285
2010-10-12 00:50:20 +00:00
Cameron Esfahani f6c73c463f Fix spelling error.
llvm-svn: 116283
2010-10-12 00:21:25 +00:00
John McCall 36e7fe31d4 Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.

llvm-svn: 116281
2010-10-12 00:20:44 +00:00
Fariborz Jahanian 77890879dd Fixes a typo which caused byte offset in debug info
for ivars to be 0. Fixes pr8353.

llvm-svn: 116273
2010-10-11 23:55:47 +00:00
Daniel Dunbar 48ed37d98e Basic: Tweak attempt to make version tags work from 'svn export's again, clip
off the extra parts of the $URL$ SVN keyword.

llvm-svn: 116269
2010-10-11 23:50:34 +00:00
Daniel Dunbar d097d913b6 Basic: Attempt to make version tags work from 'svn export's again.
llvm-svn: 116268
2010-10-11 23:44:19 +00:00
Daniel Dunbar 89329cb8f7 Driver/Darwin: Remove a useless warning about missing runtime libraries. These
are almost never needed, so the warning isn't very useful.

llvm-svn: 116263
2010-10-11 23:31:07 +00:00
Douglas Gregor 21d0e5a06c This test should now work on windows, since we're no longer using temporary files badly
llvm-svn: 116261
2010-10-11 23:18:55 +00:00
Douglas Gregor bd82998e35 Eliminate CIndexer::getClangPath(), since libclang no longer depends
on the presence of a 'clang' executable. Simplify
CIndexer::getClangResourcesPath() a bit.

Patch up the CMake makefiles to install headers into two locations in
the build tree, for those silly cases where 'clang' will end up
looking into the wrong build directory for headers.

llvm-svn: 116260
2010-10-11 23:17:59 +00:00
Fariborz Jahanian d06ab4f09e Test for //rdar: //8493239
llvm-svn: 116258
2010-10-11 23:15:47 +00:00
Fariborz Jahanian fef5d16f45 Some refactoring of property rewriting stuff
in rewriter. No functionality change.

llvm-svn: 116254
2010-10-11 22:21:03 +00:00
Douglas Gregor b9ab0ed33e Eliminate the (de-)serialization of code completion results, now that
libclang does not support out-of-process code completion.

llvm-svn: 116253
2010-10-11 22:12:15 +00:00
Douglas Gregor 4e0f15a4a2 Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.

llvm-svn: 116250
2010-10-11 22:02:06 +00:00
Devang Patel 33ddf69fb3 Fix debug info for functions whose context is a namespace.
This is tested by namespace.exp in gdb testsuite.

llvm-svn: 116248
2010-10-11 21:58:41 +00:00
Douglas Gregor 6a95802893 Eliminate clang_codeComplete(). libclang clients should be using the
faster, in-process, more-configurable clang_codeCompleteAt(). 

llvm-svn: 116245
2010-10-11 21:51:20 +00:00
Douglas Gregor 36e3b5c79e Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

  - ASTUnit wasn't saving/restoring diagnostic state appropriately between
    reparses and code completions.
  - "Overload" completions weren't being passed through to the client

llvm-svn: 116241
2010-10-11 21:37:58 +00:00
Fariborz Jahanian f3f903a9f0 This patch does a few things in the area of objective-c
properties.
1. Generates the AST for lexical info. of accessing 
   getter/setter methods using dot-syntax notation.
   This fixes //rdar: //8528170.
2. Modifes rewriter to handle the AST putout in 1.
3. Supportes in rewriter ObjCImplicitSetterGetter ASTs.

llvm-svn: 116237
2010-10-11 21:29:12 +00:00
Daniel Dunbar 7cba5a76dd IRgen/Obj-C: Fix encoding of "long double".
- The mind boggles.

llvm-svn: 116226
2010-10-11 21:13:48 +00:00
Daniel Dunbar a441d81b6b Merge encode-test-1.m into encode-test.m
llvm-svn: 116225
2010-10-11 21:13:46 +00:00
Daniel Dunbar 32708f952b FileCheck'ize test.
llvm-svn: 116224
2010-10-11 21:13:44 +00:00
Douglas Gregor 7845f1e80e Eliminate clang_setUseExternalASTGeneration() from libclang. Between
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.

llvm-svn: 116207
2010-10-11 16:52:23 +00:00
Francois Pichet c2bc5ac149 Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.
llvm-svn: 116203
2010-10-11 12:59:39 +00:00
Francois Pichet d61f192b1a Add 2 Microsoft compiler intrinsics that don't require prototypes:
__assume
__noop

llvm-svn: 116202
2010-10-11 12:00:10 +00:00
Axel Naumann b151c3c2d6 Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.
llvm-svn: 116200
2010-10-11 09:18:43 +00:00
Axel Naumann 89c31490d8 Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.
llvm-svn: 116199
2010-10-11 09:13:46 +00:00
Chris Lattner a09e8efd1f Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Chris Lattner 29e78ac923 comment out unused function
llvm-svn: 116189
2010-10-11 05:38:10 +00:00
Chris Lattner a45ebd2fd1 be less threatening.
llvm-svn: 116187
2010-10-11 05:20:49 +00:00
Argyrios Kyrtzidis 0c34b138df Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.
llvm-svn: 116186
2010-10-11 03:25:57 +00:00
Argyrios Kyrtzidis f0e31c8b9c Don't let typeinfo name symbols be 'internal hidden', it can lead to linker conflicts
with similarly named classes in anonymous namespaces.

llvm-svn: 116185
2010-10-11 03:25:53 +00:00
NAKAMURA Takumi 11f6be1ce8 lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.
It enables clang to compile Mingw's headers.

llvm-svn: 116184
2010-10-11 02:30:56 +00:00
NAKAMURA Takumi 89acd1e7ef lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.
llvm-svn: 116183
2010-10-11 02:28:42 +00:00
NAKAMURA Takumi e4faafba32 lib/Frontend/InitHeaderSearch.cpp: Fix compatibility to Cygming.
- lib/gcc/include should not be included. Clang oughta have alternatives. (PR7956)
  - Cygwin: /usr/include/w32api should be included. gcc/cygwin does.
  - gcc/cygwin uses gcc paths as /usr/lib not /lib. They are same on Cygwin environment, though, We have to take what gcc/cygwin does.
  - Cygwin-1.7: Use 4.3.4.
  - Cygwin-1.5: Use 4.3.2 for gcc-4.

llvm-svn: 116182
2010-10-11 02:27:37 +00:00
Chris Lattner 88fdea8ad9 fix PR8217, a silent miscompilation of invalid code.
llvm-svn: 116166
2010-10-10 18:16:20 +00:00
Chris Lattner 001b29ccc1 Allow a string literal to initialize a tail array (PR8217), patch
by Pierre Habouzit!

llvm-svn: 116165
2010-10-10 17:49:49 +00:00
Francois Pichet 52bea03e7a Unbreak the CMake build.
llvm-svn: 116164
2010-10-10 09:17:09 +00:00