- Jul 07, 2012
-
-
John McCall authored
in the ABI arrangement, and leave a hook behind so that we can easily tweak CCs on platforms that use different CCs by default for C++ instance methods. llvm-svn: 159894
-
Ted Kremenek authored
Enhance 'diagtool list-warnings' to report number of diagnostics covered directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow. llvm-svn: 159893
-
Ted Kremenek authored
- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32 - Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic. llvm-svn: 159892
-
NAKAMURA Takumi authored
Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything." It broke several builds. I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test. > 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp llvm-svn: 159886
-
Dmitri Gribenko authored
llvm-svn: 159878
-
Ted Kremenek authored
This patch introduces some magic in tablegen to create a "Pedantic" diagnostic group which automagically includes all warnings that are extensions. This allows a user to suppress specific warnings traditionally under -pedantic used an ordinary warning flag. This also allows users to use #pragma to silence specific -pedantic warnings, or promote them to errors, within blocks of text (just like any other warning). -Wpedantic is NOT an alias for -pedantic. Instead, it provides another way to (a) activate -pedantic warnings and (b) disable them. Where they differ is that -pedantic changes the behavior of the preprocessor slightly, whereas -Wpedantic does not (it just turns on the warnings). The magic in the tablegen diagnostic emitter has to do with computing the minimal set of diagnostic groups and diagnostics that should go into -Wpedantic, as those diagnostics that already members of groups that themselves are (transitively) members of -Wpedantic do not need to be included in the Pedantic group directly. I went back and forth on whether or not to magically generate this group, and the invariant was that we always wanted extension warnings to be included in -Wpedantic "some how", but the bookkeeping would be very onerous to manage by hand. -no-pedantic (and --no-pedantic) is included for completeness, and matches many of the same kind of flags the compiler already supports. It does what it says: cancels out -pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or -Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We can debate the correct behavior here. Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp that determine whether to include the "-pedantic" flag in the warning output. This is no longer needed, as all extensions now have a -W flag. This patch also significantly reduces the number of warnings not under flags from 229 to 158 (all extension warnings). That's a 31% reduction. llvm-svn: 159875
-
Jordan Rose authored
llvm-svn: 159869
-
Jordan Rose authored
This allows SourceLocations to be stored in generic "data" fields that are typed as "const void *" and are also used to point to const objects. Really we should probably be returning a const pointer from getPtrEncoding as well, but in some places we want to store SourceLocations in the same generic "data" field as proper pointers to /mutable/ objects. Oh well. llvm-svn: 159868
-
Jordan Rose authored
No functionality change. llvm-svn: 159867
-
- Jul 06, 2012
-
-
Jordan Rose authored
We use LazyCompoundVals to avoid copying the contents of structs and arrays around in the store, and when we need to pass a struct around that already has a LazyCompoundVal we just use the original one. However, it's possible that the first field of a struct may have a LazyCompoundVal of its own, and we currently can't distinguish a LazyCompoundVal for the first element of a struct from a LazyCompoundVal for the entire struct. In this case we should just drop the optimization and make a new LazyCompoundVal that encompasses the old one. PR13264 / <rdar://problem/11802440> llvm-svn: 159866
-
Matt Beaumont-Gay authored
llvm-svn: 159860
-
Fariborz Jahanian authored
a 'weak' property just as we do the same for 'weak' variables. // rdar://11814185 llvm-svn: 159859
-
Fariborz Jahanian authored
over objective-c container collection. // rdar://9293227 llvm-svn: 159847
-
Dmitri Gribenko authored
currently we take address of std::vector's contents only after we finished adding all comments (so no reallocation can happen), this will change in future. llvm-svn: 159845
-
Dmitri Gribenko authored
llvm-svn: 159833
-
Dmitri Gribenko authored
llvm-svn: 159830
-
Benjamin Kramer authored
llvm-svn: 159829
-
NAKAMURA Takumi authored
llvm-svn: 159818
-
NAKAMURA Takumi authored
llvm-svn: 159816
-
Arnaud A. de Grandmaison authored
llvm-svn: 159810
-
Manuel Klimek authored
llvm-svn: 159809
-
Manuel Klimek authored
llvm-svn: 159807
-
Manuel Klimek authored
matches on interesting parts of the AST, and callback mechanisms to act on them. llvm-svn: 159805
-
Dmitri Gribenko authored
llvm-svn: 159797
-
Lang Hames authored
llvm-svn: 159796
-
Lang Hames authored
This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
-
Dmitri Gribenko authored
llvm-svn: 159793
-
Fariborz Jahanian authored
for doing delayed parsing of c++ method defined in objc class implementations. llvm-svn: 159792
-
Dmitri Gribenko authored
very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
-
Argyrios Kyrtzidis authored
that the migrator handles) but return their instances as 'id', resulting in the compiler resolving 'objectForKey:' as the method from NSDictionary. When checking if we can convert to subscripting syntax, check whether the receiver is a result of a class method from a hardcoded list of such classes. In such a case return the specific class as the interface of the receiver. llvm-svn: 159788
-
Fariborz Jahanian authored
under -Wsuper-class-method-mismatch for method mismatches in current and suprt class. // rdar://11793793 llvm-svn: 159784
-
- Jul 05, 2012
-
-
Argyrios Kyrtzidis authored
(apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc. and the subscripting methods as well. Part of rdar://11734969 llvm-svn: 159783
-
DeLesley Hutchins authored
duplicates attributes on the declaration. Also eliminates a false negative in ReleasableMutexLock. Fixing this bug required some refactoring. llvm-svn: 159780
-
Anna Zaks authored
[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output. llvm-svn: 159776
-
Simon Atanasyan authored
if -mdsp or -mdspr2 options are provided. llvm-svn: 159774
-
Fariborz Jahanian authored
of out-of-line c++ method definition which happens to be inside an objc class implementation until I can figure out how to do it. This is to fix a broken project. llvm-svn: 159772
-
Simon Atanasyan authored
llvm-svn: 159769
-
Simon Atanasyan authored
llvm-svn: 159767
-
Jordan Rose authored
This may turn out to be a controversial change, due to string literals being uniqued at link time, but Apple's docs only say "The compiler makes such object constants unique on a per-module basis..."[1] without actually saying what a "module" is. (It's not a clang module.) Furthermore, this uniqueness guarantee often can't be guaranteed once the string has been passed through framework code. If this does turn out very controversial, we could downgrade this to a DefaultError warning for strings, and leave it as a true Error for other kinds of literals. (<rdar://problem/11300873>) [1]: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html llvm-svn: 159766
-
Manuel Klimek authored
used with classes that generate ASTConsumers; this allows decoupling the ASTConsumer generation from the Frontend library (like, for example, the MatchFinder in the upcoming ASTMatcher patch). llvm-svn: 159760
-