Skip to content
Snippets Groups Projects
  1. May 21, 2013
  2. May 20, 2013
  3. May 19, 2013
  4. May 18, 2013
    • Chandler Carruth's avatar
      Fix a logic bug in the handling of -fmath-errno in the driver. We would · b69557ed
      Chandler Carruth authored
      imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math,
      regardless of in which order and regardless of the tool chain default.
      
      I've fixed this to follow the logic:
      
      1) If the last dominating flag is -fno-math-errno, -ffast-math, or
         -Ofast, then do not use math-errno.
      2) If the last dominating flag is an explicit -fmath-errno, do use
         math-errno.
      3) Otherwise, use the toolchain default.
      
      This, for example, allows the flag sequence
      '-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or
      '-fno-math-errno' to preserve the toolchain default. Most notably, this
      should prevent users trying to disable fast-math optimizations on Darwin
      and BSD platforms from simultaneously enabling (pointless) -fmath-errno.
      
      I've enhanced the tests (after more reorganization) to cover this and
      other weird permutations of flags and targets.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182203 91177308-0d34-0410-b5e6-96231b3b80d8
      b69557ed
    • Chandler Carruth's avatar
      Slight reorganization of the fast-math tests which test for errno · edc31334
      Chandler Carruth authored
      setting. Consolidate the collection of tests that enable -fmath-errno
      and share a single CHECK line for simplicity.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182202 91177308-0d34-0410-b5e6-96231b3b80d8
      edc31334
    • Serge Pavlov's avatar
      Removed invalid character. · fa047c58
      Serge Pavlov authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182189 91177308-0d34-0410-b5e6-96231b3b80d8
      fa047c58
    • Jordan Rose's avatar
      [analyzer] New edges: include an edge to the end-of-path location. · 6d0da608
      Jordan Rose authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182188 91177308-0d34-0410-b5e6-96231b3b80d8
      6d0da608
    • Jordan Rose's avatar
      [analyzer] "Fix" ParentMap to handle non-syntactic OpaqueValueExprs. · b9fdfb50
      Jordan Rose authored
      Constructs like PseudoObjectExpr, where an expression can appear more than
      once in the AST, use OpaqueValueExprs to guard against inadvertent
      re-processing of the shared expression during AST traversal. The most
      common form of this is to share expressions between the syntactic
      "as-written" form of, say, an Objective-C property access 'obj.prop', and
      the underlying "semantic" form '[obj prop]'.
      
      However, some constructs can produce OpaqueValueExprs that don't appear in
      the syntactic form at all; in these cases the ParentMap wasn't ever traversing
      the children of these expressions. This patch fixes that by checking to see
      if an OpaqueValueExpr's child has ever been traversed before. There's also a
      bit of reset logic when visiting a PseudoObjectExpr to handle the case of
      updating the ParentMap, which some external clients depend on.
      
      This still isn't exactly the right fix because we probably want the parent
      of the OpaqueValueExpr itself to be its location in the syntactic form if
      it's syntactic and the PseudoObjectExpr or BinaryConditionalOperator itself
      if it's semantic. Whe I originally wrote the code to do this, I didn't realize
      that OpaqueValueExprs themselves are shared in the AST, not just their source
      expressions. This patch doesn't change the existing behavior so as not to
      break anything inadvertently relying on it; we'll come back to this later.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182187 91177308-0d34-0410-b5e6-96231b3b80d8
      b9fdfb50
Loading