Justin Bogner [Tue, 11 Mar 2014 06:49:34 +0000 (06:49 +0000)]
test: Regenerate profile data for PGO tests
Some of this data had gotten out of date, so we weren't quite testing
what we thought we were. This also moves the outdated data test to its
own file to simplify regenerating the test data.
[HeaderSearch] Fix issue where if a headermap entry maps the filename to a framework import (non-absolute path)
then we fail to find it if it is re-included later on.
Justin Bogner [Tue, 11 Mar 2014 04:37:49 +0000 (04:37 +0000)]
test: Give instrumentation based profiling tests their own directory
These tests are logically related, but they're spread about several
different CodeGen directories. Consolidate them in one place to make
them easier to manage.
Richard Trieu [Tue, 11 Mar 2014 03:11:08 +0000 (03:11 +0000)]
Move the warning about unused relational comparison from -Wunused-value to
-Wunused-comparison. Also, newly warn on unused result from overloaded
relational comparisons, now also in -Wunused-comparison.
Richard Smith [Tue, 11 Mar 2014 03:10:46 +0000 (03:10 +0000)]
If a visibility update record is found for a DeclContext after that Decl has
already been loaded, apply that update record to the Decl immediately, rather
than adding it to a pending list and never applying it.
Richard Smith [Tue, 11 Mar 2014 02:02:47 +0000 (02:02 +0000)]
If a module map is found in a relative -I path, convert the filenames within it
to absolute paths when building the includes file for the module. Without this,
the module build would fail, because the relative paths we were using are not
necessarily relative to a directory in our include path.
Ben Langmuir [Mon, 10 Mar 2014 23:17:14 +0000 (23:17 +0000)]
Add -fmodules-cache-path to test/Headers/c11.c
This started failing for me the last time someone modified the AST file
format. It would be nice if we could just have lit take care of the
module cache used during testing for us, but this helps in the meantime.
Ben Langmuir [Mon, 10 Mar 2014 22:34:23 +0000 (22:34 +0000)]
Turn on the uncovered umbrella header warning by default
This warning (under -Wincomplete-umbrella) diagnoses cases that are
difficult to understand without the compiler's help, since the symptom
is likely to be that you are missing the contents of headers that are
mistakenly omitted from a module. This seems like a good thing to have
on by default (with the usual caveat for -Wsystem-headers).
John McCall [Mon, 10 Mar 2014 22:27:33 +0000 (22:27 +0000)]
RTTI symbols for visible local types may need weak linkage.
Previously, we would always emit them with internal linkage,
but with hidden visibility when the function was hidden, which
is an illegal combination, which could lead LLVM to actually
emit them as strong hidden symbols with hilarious results.
Aaron Ballman [Mon, 10 Mar 2014 17:08:28 +0000 (17:08 +0000)]
[C++11] Replacing DeclBase iterators specific_attr_begin() and specific_attr_end() with iterator_range specific_attrs(). Updating all of the usages of the iterators with range-based for loops.
Samuel Benzaquen [Mon, 10 Mar 2014 15:40:23 +0000 (15:40 +0000)]
Add loc() to the dynamic registry.
Summary:
Add loc() to the dynamic registry.
Other fixes:
- Fix the polymorphic variant value to accept an exact match, even if
there are other possible conversions.
- Fix specifiesTypeLoc() to not crash on an empty
NestedNameSpecifierLoc.
Richard Smith [Mon, 10 Mar 2014 00:04:29 +0000 (00:04 +0000)]
When a type's definition is instantiated, the definition becomes visible, even
if the type's declaration was previously instantiated in an unimported module.
(For an imported type definition, this already worked, because the source
location is set to the location of the definition, but for locally-instantiated
type definitions, it did not.)
Logan Chien [Sun, 9 Mar 2014 16:21:03 +0000 (16:21 +0000)]
Fix uninitialized value in AttributedTypeLoc.
Clang might crash while reading the precompiled headers if
we don't initialize the AttrEnumOperandLoc properly.
This commit fixes the combination of string attribute
operand and enum operand. Besides, this commit also adds
several assertions to avoid unexpected operand kind.
[C++11] Update Clang for the change to LLVM's Use-Def chain iterators in
r203364: what was use_iterator is now user_iterator, and there is
a use_iterator for directly iterating over the uses.
This also switches to use the range-based APIs where appropriate.
Aaron Ballman [Sat, 8 Mar 2014 22:19:01 +0000 (22:19 +0000)]
[C++11] Replacing Decl iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage.
Aaron Ballman [Sat, 8 Mar 2014 20:12:42 +0000 (20:12 +0000)]
[C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Sat, 8 Mar 2014 18:45:14 +0000 (18:45 +0000)]
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops.
Ted Kremenek [Sat, 8 Mar 2014 02:22:32 +0000 (02:22 +0000)]
[-Wunreachabe-code] Don't warn about unreachable destructors for temporaries.
This can possibly be refined later, but right now the experience
is so incomprehensible for a user to understand what is going on
this isn't a useful warning.
Richard Smith [Sat, 8 Mar 2014 00:03:56 +0000 (00:03 +0000)]
Module [extern_c] attribute: inherit to submodules, don't write 'extern "C"'
blocks when building in C mode, and serialize and deserialize the attribute.
Aaron Ballman [Fri, 7 Mar 2014 22:17:20 +0000 (22:17 +0000)]
In my tests, I'm finding that declaring iterators in terms of ranges can sometimes have dangerous side-effects where the range temporary is destroyed, taking the underlying iterators out with it.
This changes the iterators so that they are no longer implemented in terms of ranges (so it's a very partial revert of the existing rangification efforts).
Aaron Ballman [Fri, 7 Mar 2014 19:56:05 +0000 (19:56 +0000)]
[C++11] Replacing DeclBase iterators decls_begin() and decls_end() with iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 18:11:58 +0000 (18:11 +0000)]
[C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 17:50:17 +0000 (17:50 +0000)]
[C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 16:40:17 +0000 (16:40 +0000)]
[C++11] Adding an iterator_range accessor for parameter declarations to the CaptureDecl class; however, the only usage of the iterators cannot be converted to using the range yet. This change is for consistency with other Decls exposing parameters.
Aaron Ballman [Fri, 7 Mar 2014 16:09:59 +0000 (16:09 +0000)]
[C++11] Replacing BlockDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 15:12:56 +0000 (15:12 +0000)]
[C++11] Replacing FunctionDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 14:09:15 +0000 (14:09 +0000)]
[C++11] Replacing iterators ddiag_begin() and ddiag_end() with iterator_range ddiags(). Updating all of the usages of the iterators with range-based for loops.
Aaron Ballman [Fri, 7 Mar 2014 12:50:00 +0000 (12:50 +0000)]
[C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.