Skip to content
  1. Jul 07, 2012
    • John McCall's avatar
      Distinguish more carefully between free functions and C++ instance methods · 8dda7b27
      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
      8dda7b27
    • Ted Kremenek's avatar
      Enhance 'diagtool list-warnings' to report number of diagnostics covered... · 30105f67
      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
      30105f67
    • Ted Kremenek's avatar
      Re-apply r159875 with fixes. · b22ea2ac
      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
      b22ea2ac
    • NAKAMURA Takumi's avatar
      Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement... · eec53e40
      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
      eec53e40
    • Dmitri Gribenko's avatar
      44cd7e67
    • Ted Kremenek's avatar
      Implement -Wpedantic and --no-pedantic to complement -Weverything. · 9877f689
      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
      9877f689
    • Jordan Rose's avatar
      [analyzer] Fix mis-committed test. No functionality change. · 183096d0
      Jordan Rose authored
      llvm-svn: 159869
      183096d0
    • Jordan Rose's avatar
      Constify the argument to SourceLocation::getFromPtrEncoding. · 1e0719ef
      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
      1e0719ef
    • Jordan Rose's avatar
      [analyzer] Add comments to Calls.h. · 5df10aa5
      Jordan Rose authored
      No functionality change.
      
      llvm-svn: 159867
      5df10aa5
  2. Jul 06, 2012
  3. Jul 05, 2012
Loading