summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* clang/test/PCH/modified-header-error.c: Disable it again. It had been ↵NAKAMURA Takumi2013-01-251-0/+1
| | | | | | problematic on win32 for while. llvm-svn: 173439
* clang/test: Drop "REQUIRES:shell" in three tests. They can run on win32.NAKAMURA Takumi2013-01-251-1/+0
| | | | llvm-svn: 173419
* [PCH] Temporarily disable the "ambiguous macro" warning that is currently ↵Argyrios Kyrtzidis2013-01-231-0/+28
| | | | | | | | | | | | bogus with a PCH that redefined a macro without undef'ing it first. Proper reconstruction of the macro info history from modules will properly fix this in subsequent commits. rdar://13016031 llvm-svn: 173281
* Switch to APFloat constructor taking fltSemantics.Tim Northover2013-01-221-0/+18
| | | | | | | | This change also makes the serialisation store the required semantics, fixing an issue where PPC128 was always assumed when re-reading a 128-bit value. llvm-svn: 173139
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-202-0/+7
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* Revert Clang r172620 and r172629, which caused a hang when buildingDouglas Gregor2013-01-181-28/+0
| | | | | | | complicated modules (<rdar://problem/13038265>). Unfortunately, this un-fixes <rdar://problem/13016031>. llvm-svn: 172783
* [PCH/Modules] Change how macro [re]definitions are de/serialized.Argyrios Kyrtzidis2013-01-161-0/+28
| | | | | | | | | | | | | | | | | | Previously we would serialize the macro redefinitions as a list, part of the identifier, and try to chain them together across modules individually without having the info that they were already chained at definition time. Change this by serializing the macro redefinition chain and then try to synthesize the chain parts across modules. This allows us to correctly pinpoint when 2 different definitions are ambiguous because they came from unrelated modules. Fixes bogus "ambiguous expansion of macro" warning when a macro in a PCH is redefined without undef'ing it first. rdar://13016031 llvm-svn: 172620
* Implement AST dumper for Decls.Alexander Kornienko2012-12-201-5/+5
| | | | | | | | http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! llvm-svn: 170634
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-182-0/+37
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-182-37/+0
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-182-0/+37
| | | | llvm-svn: 170428
* clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 ↵NAKAMURA Takumi2012-12-121-0/+3
| | | | | | | | to r169831. "ansi-escape-sequences" is easy convenient to exclude win32. Please be patient. llvm-svn: 169945
* Try to fix Win32 failuresDouglas Gregor2012-12-111-1/+1
| | | | llvm-svn: 169923
* Finish implementing 'selected constructor' rules for triviality in C++11. InRichard Smith2012-12-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | the cases where we can't determine whether special members would be trivial while building the class, we eagerly declare those special members. The impact of this is bounded, since it does not trigger implicit declarations of special members in classes which merely *use* those classes. In order to determine whether we need to apply this rule, we also need to eagerly declare move operations and destructors in cases where they might be deleted. If a move operation were supposed to be deleted, it would instead be suppressed, and we could need overload resolution to determine if we fall back to a trivial copy operation. If a destructor were implicitly deleted, it would cause the move constructor of any derived classes to be suppressed. As discussed on cxx-abi-dev, C++11's selected constructor rules are also retroactively applied as a defect resolution in C++03 mode, in order to identify that class B has a non-trivial copy constructor (since it calls A's constructor template, not A's copy constructor): struct A { template<typename T> A(T &); }; struct B { mutable A a; }; llvm-svn: 169673
* Looks like lit on Windows can't cope with parens here, and in any case, we ↵Richard Smith2012-12-051-1/+1
| | | | | | shouldn't need them after r169441. llvm-svn: 169442
* More workarounds for PR10867.Richard Smith2012-12-051-1/+2
| | | | llvm-svn: 169437
* Store on the CXXRecordDecl whether the class has, or would have, a copyRichard Smith2012-11-282-0/+9
| | | | | | | constructor/assignment operator with a const-qualified parameter type. The prior method for determining this incorrectly used overload resolution. llvm-svn: 168775
* [PCH] Reading expressions from attributes should be done using ReadExpr(),Argyrios Kyrtzidis2012-11-151-0/+317
| | | | | | | | | | | not ReadExpr(). Also add a test case making sure the thread safety attributes work as expected when they come from a PCH. Fixes rdar://12584141 & http://llvm.org/PR13982 llvm-svn: 168017
* Copy the decls returned by DeclContext::lookup_result to aArgyrios Kyrtzidis2012-11-131-0/+40
| | | | | | | | | new container so we can safely iterate over them. The container holding the lookup decls can under certain conditions be changed while iterating (e.g. because of deserialization). llvm-svn: 167816
* [PCH] Write out the ClassTemplateDecl::Common::InjectedClassNameType typeArgyrios Kyrtzidis2012-11-061-0/+46
| | | | | | | | | | | | | | | | | reference instead of relying on computing it. In general, if storage is no issue, it is preferable to deserialize info from the PCH instead of trying to recompute it after the PCH was loaded. The incentive to change this now was due to r155303 changing how friend template classes in dependent contexts are handled; such classes can now be chained to a previous template class but the computed InjectedClassNameType may be different due to the extra template parameters from the dependent context. The new handling requires more investigation but, in the meantime, writing out InjectedClassNameType fixes PCH issue in rdar://12627738. llvm-svn: 167425
* Our style for diagnostic messages is to not include a trailing dot.Matt Beaumont-Gay2012-11-051-1/+1
| | | | llvm-svn: 167379
* [PCH] Remove the stat cache from the PCH file.Argyrios Kyrtzidis2012-10-312-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stat cache became essentially useless ever since we started validating all file entries in the PCH. But the motivating reason for removing it now is that it also affected correctness in this situation: -You have a header without include guards (using "#pragma once" or #import) -When creating the PCH: -The same header is referenced in an #include with different filename cases. -In the PCH, of course, we record only one file entry for the header file -But we cache in the PCH file the stat info for both filename cases -Then the source files are updated and the header file is updated in a way that its size and modification time are the same but its inode changes -When using the PCH: -We validate the headers, we check that header file and we create a file entry with its current inode -There's another #include with a filename with different case than the previously created file entry -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode -because of the different inodes, we think they are different files so we go ahead and include its contents. Removing the stat cache will potentially break clients that are attempting to use the stat cache as a way of avoiding having the actual input files available. If that use case is important, patches are welcome to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with literal strings, line/column computations, etc.). This fixes rdar://5502805 llvm-svn: 167172
* [PCH] The diagnostic state points can refer to previously createdArgyrios Kyrtzidis2012-10-301-5/+16
| | | | | | | | | diagnostic states; make sure the ASTReader sets the diagnostic state properly instead of always recreating it. Fixes rdar://12581618 & http://llvm.org/PR14181 llvm-svn: 166987
* Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.Kaelyn Uhrain2012-10-253-2/+2
| | | | llvm-svn: 166711
* Correct test inovocations to use %clang_cc1 rather than direct invocation ↵David Tweed2012-10-253-10/+10
| | | | | | (so that it can have additional options set when trying to debug issues causing regressions). llvm-svn: 166681
* Teach the PCH validator to check the preprocessor options, especiallyDouglas Gregor2012-10-242-4/+21
| | | | | | | | | | | | | | | the macros that are #define'd or #undef'd on the command line. This checking happens much earlier than the current macro-definition checking and is far cleaner, because it does a direct comparison rather than a diff of the predefines buffers. Moreover, it allows us to use the result of this check to skip over PCH files within a directory that have non-matching -D's or -U's on the command line. Finally, it improves the diagnostics a bit for mismatches, fixing <rdar://problem/8612222>. The old predefines-buffer diff'ing will go away in a subsequent commit. llvm-svn: 166641
* Explicitly specify C++98 when building the C++ precompiled header for this ↵Douglas Gregor2012-10-241-4/+2
| | | | | | test, so that the test will work on Windows. llvm-svn: 166601
* clang/test/PCH/pch-dir.c: Update a comment for msvc. msvc(*-win32) implies ↵NAKAMURA Takumi2012-10-231-1/+1
| | | | | | -std=c++11. llvm-svn: 166478
* clang/test/PCH/pch-dir.c: Mark it as XFAIL:msvc. It doesn't fail (virtually ↵NAKAMURA Takumi2012-10-231-0/+3
| | | | | | xpass) on msvc. llvm-svn: 166473
* clang/test/PCH/pch-dir.c: Relax expressions of path separators for Win32.NAKAMURA Takumi2012-10-231-2/+2
| | | | llvm-svn: 166471
* If the precompiled header named by "-include" is actually a directory,Douglas Gregor2012-10-233-1/+28
| | | | | | | | | check each of the files within that directory to determine if any of them is an AST file that matches the language and target options. If so, the first matching AST file is loaded. This fixes a longstanding discrepency with GCC's precompiled header implementation. llvm-svn: 166469
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-1937-1/+69
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Move the set of files to be validated in an AST file into the controlDouglas Gregor2012-10-191-10/+2
| | | | | | | | | | | | | block, so the input files are validated early on, before we've committed to loading the AST file. This (accidentally) fixed a but wherein the main file used to generate the AST file would *not* be validated by the existing validation logic. At the moment, this leads to some duplication of filenames between the source manager block and input-file blocks, as well as validation logic. This will be handled via an upcoming patch. llvm-svn: 166251
* DR1442: In a range-based for statement, namespace 'std' is not an associatedRichard Smith2012-10-181-2/+3
| | | | | | namespace. llvm-svn: 166194
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-162-0/+7
| | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). llvm-svn: 166072
* Rework the (de-)serialization of macros, as stored inDouglas Gregor2012-10-093-0/+9
| | | | | | | | | | | | | | | | MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. llvm-svn: 165560
* Added a test for C++11 statement attributes serialization.Alexander Kornienko2012-10-022-0/+26
| | | | | | | | | | | | | | Summary: Uses [[clang::fallthrough]] attribute in a template function, and -Wimplicit-fallthrough to check the attribute presence in an instantiation. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D55 llvm-svn: 165068
* Serialize the 'IsConstexpr' bit of VarDecls. Fixes <rdar://problem/12328814>.Douglas Gregor2012-09-201-0/+9
| | | | llvm-svn: 164335
* Fix abbreviation for CharacterLiteral in AST serialization. PR13806.Eli Friedman2012-09-142-0/+11
| | | | llvm-svn: 163863
* clang/test/PCH/missing-file.cpp: Try to suppress accidental false on Windows.NAKAMURA Takumi2012-09-121-1/+4
| | | | | | %t.h might be touched by scanners as a hot file on Windows, to fail to remove %.h with single run. llvm-svn: 163697
* PR13811: Add a FunctionParmPackExpr node to handle references to functionRichard Smith2012-09-122-5/+19
| | | | | | | parameter packs where the reference is not being expanded but the pack has been. Previously, Clang would segfault in such cases. llvm-svn: 163672
* [PCH] When loading fields from external storage make sure to alsoArgyrios Kyrtzidis2012-09-101-0/+35
| | | | | | | | | | | load in the IndirectField declarations as well. Field designators in initializer lists depend on traversing the fields decl chain to find the indirect fields. Fixes rdar://12239321 llvm-svn: 163552
* PR9023: A template template parameter whose template parameter list contains anRichard Smith2012-09-072-0/+11
| | | | | | | | | | | | | unexpanded parameter pack is a pack expansion. Thus, as with a non-type template parameter which is a pack expansion, it needs to be expanded early into a fixed list of template parameters. Since the expanded list of template parameters is not itself a parameter pack, it is permitted to appear before the end of the template parameter list, so also remove that restriction (for both template template parameter pack expansions and non-type template parameter pack expansions). llvm-svn: 163369
* test/PCH/objc_stmts.m: Suppress stderr to be fed to FileCheck.NAKAMURA Takumi2012-07-251-2/+2
| | | | llvm-svn: 160720
* Turn -Wobjc-root-class on by default. <rdar://problem/11203649>.Ted Kremenek2012-07-251-1/+1
| | | | llvm-svn: 160707
* Rolling this change back because the fix doesn't fit the symptoms (even if ↵Aaron Ballman2012-07-181-3/+3
| | | | | | it solves them). llvm-svn: 160462
* Fixing up a test case that was failing due to the lack of -std=c++11Aaron Ballman2012-07-181-3/+3
| | | | llvm-svn: 160455
* Allow -verify directives to be filtered by preprocessing.Jordan Rose2012-07-1113-29/+44
| | | | | | | | | | | | | | | | | | | | | This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler, which then only reads the -verify directives that are actually in live blocks of code. It also makes it simpler to handle -verify directives that appear in header files, though we still have to manually reparse some files depending on how they are generated. This requires some test changes. In particular, all PCH tests now have their -verify directives outside the "header" portion of the file, using the @line syntax added in r159978. Other tests have been modified mostly to make it clear what is being tested, and to prevent polluting the expected output with the directives themselves. Patch by Andy Gibbs! (with slight modifications) The new Frontend/verify-* tests exercise the functionality of this commit, as well as r159978, r159979, and r160053 (Andy's other -verify enhancements). llvm-svn: 160068
* [PCH] Make sure that all newly introduced visible decls in a DeclContextArgyrios Kyrtzidis2012-07-021-0/+44
| | | | | | | | | | | | | | | | | coming from an AST file are registered for serialization. A static data member instantiation of in a chained PCH could be missed when serializing decls; the result was that when emitting the visible decls map of its DeclContext, we would use a DeclID that was not actually emitted, leading to crashes or hangs. Fix this by making sure such decls are always registered for serialization. Also introduce extra sanity checks to make sure we don't register new declarations or types after we have serialized the types/decls block. rdar://11728990 llvm-svn: 159550
* PR13189: va_list broken with precompiled headersMeador Inge2012-07-012-0/+17
| | | | | | | | | | For some targets a structure named __va_list_tag is built to help define the __builtin_va_list type. However, __va_list_tag was not being treated as a predefined type thus causing problems when serializing the AST. This commit fixes that oversight by adding the necessary support to treat __va_list_tag as a predefined type. llvm-svn: 159508
OpenPOWER on IntegriCloud