1. Apr 24, 2011
  2. Apr 23, 2011
    • Francois Pichet's avatar
      Remove unnecessary const away cast in LateTemplateParserCallback. · a7d337d1
      Francois Pichet authored
      llvm-svn: 130058
      a7d337d1
    • Chandler Carruth's avatar
      Implement basic __is_trivial type-trait support, enough to close PR9472. · a3e1f9a0
      Chandler Carruth authored
      This introduces a few APIs on the AST to bundle up the standard-based
      logic so that programmatic clients have access to exactly the same
      behavior.
      
      There is only one serious FIXME here: checking for non-trivial move
      constructors and move assignment operators. Those bits need to be added
      to the declaration and accessors provided.
      
      This implementation should be enough for the uses of __is_trivial in
      libstdc++ 4.6's C++98 library implementation.
      
      Ideas for more thorough test cases or any edge cases missing would be
      appreciated. =D
      
      llvm-svn: 130057
      a3e1f9a0
    • Chandler Carruth's avatar
      Sort the type traits in a few places where they weren't previously · 7980348f
      Chandler Carruth authored
      sorted in order to prepare for adding some new ones.
      
      llvm-svn: 130056
      7980348f
    • Chandler Carruth's avatar
      Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This · 61fbf628
      Chandler Carruth authored
      matches GCC behavior which libstdc++ uses to limit #warning-based
      messages about deprecation.
      
      The machinery involves threading this through a new '-fdeprecated-macro'
      flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We
      turn the flag off in the driver when the warning is turned off (modulo
      matching some GCC bugs). We record this as a language option, and key
      the preprocessor on the option when introducing the define.
      
      A separate flag rather than a '-D' flag allows us to properly represent
      the difference between C and C++ builds (only C++ receives the define),
      and it allows the specific behavior of following -Wdeprecated without
      potentially impacting the set of user-provided macro flags.
      
      llvm-svn: 130055
      61fbf628
    • Jay Foad's avatar
      Like the coding standards say, do not use "using namespace std". · 72e705ed
      Jay Foad authored
      llvm-svn: 130054
      72e705ed
    • Benjamin Kramer's avatar
      Silence an overzealous uninitialized variable warning from GCC. · 3db05465
      Benjamin Kramer authored
      llvm-svn: 130053
      3db05465
    • Chandler Carruth's avatar
      GCC overloads -Wwrite-strings just to make it extra confusing. While it · 153329da
      Chandler Carruth authored
      changes language semantics in C and ObjC (which Clang has supported for
      a while), in C++ it's the name used for Clang's
      -Wdeprecated-writable-strings.
      
      Clang's name is at least less overloaded if still confusing (the string
      isn't writable, we just allow converting to a non-const pointer without
      warning), so I've left it in place and made the GCC name an alias for
      compatibility.
      
      With this I've implemented all the aspects of GCC's -Wwrite-strings I've
      encountered which didn't work with Clang.
      
      llvm-svn: 130052
      153329da
    • Chandler Carruth's avatar
      There were some frustrating problems with the implementation of · b009b149
      Chandler Carruth authored
      -Wwrite-strings. First and foremost, once the positive form of the flag
      was passed, it could never be disabled by passing -Wno-write-strings.
      Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
      control diagnostics (as GCC does) because it was essentially hijacked to
      drive the language semantics.
      
      Fix this by giving CC1 a clean '-fconst-strings' flag to enable
      const-qualified strings in C and ObjC compilations. Corresponding
      '-fno-const-strings' is also added. Then the driver is taught to
      introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
      dominates.
      
      This entire flag is basically GCC-bug-compatibility driven, so we also
      match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
      open to changing this though as it seems insane.
      
      llvm-svn: 130051
      b009b149
    • Andrew Trick's avatar
      Accidental function name mangling. · 76dca78c
      Andrew Trick authored
      llvm-svn: 130050
      76dca78c
    • Andrew Trick's avatar
      Thumb2 and ARM add/subtract with carry fixes. · 0ed5778a
      Andrew Trick authored
      Fixes Thumb2 ADCS and SBCS lowering: <rdar://problem/9275821>.
      t2ADCS/t2SBCS are now pseudo instructions, consistent with ARM, so the
      assembly printer correctly prints the 's' suffix.
      
      Fixes Thumb2 adde -> SBC matching to check for live/dead carry flags.
      
      Fixes the internal ARM machine opcode mnemonic for ADCS/SBCS.
      Fixes ARM SBC lowering to check for live carry (potential bug).
      
      llvm-svn: 130048
      0ed5778a
    • Andrew Trick's avatar
      Comment edit. · 3260c9df
      Andrew Trick authored
      llvm-svn: 130047
      3260c9df
    • Andrew Trick's avatar
      whitespace · 1a1f8d46
      Andrew Trick authored
      llvm-svn: 130046
      1a1f8d46
    • John McCall's avatar
      Diagnose C++ abstract parameters for Objective-C methods. · d44f4d74
      John McCall authored
      llvm-svn: 130045
      d44f4d74