Skip to content
Snippets Groups Projects
  1. Oct 23, 2013
    • Faisal Vali's avatar
      And Again: Teach TreeTransform how to transform nested generic lambdas. · a3d311e4
      Faisal Vali authored
      A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted,
      
      The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType.  This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off.
      Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476.
      
      The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created.   
      
      Another attempt caused a test to fail (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091533.html) and also had to be reverted - my apologies - in my haste, i did not run all the tests - argh!
      
      Now all the tests seem to pass - but a Fixme has been added - since I suspect Richard will find the fix a little inelegant ;) I shall try and work on a more elegant fix once I have had a chance to discuss with Richard or Doug at a later date.
      
      Hopefully the third time;s a charm *fingers crossed*
      
      This does not yet include capturing.
      
      Please see test file for examples.
      
      This patch was LGTM'd by Doug:
      http://llvm-reviews.chandlerc.com/D1784
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193230 91177308-0d34-0410-b5e6-96231b3b80d8
      a3d311e4
    • Rafael Espindola's avatar
      Revert r193223 and r193216. · 80f2b2e6
      Rafael Espindola authored
      They were causing CodeGenCXX/mangle-exprs.cpp to fail.
      
      Revert "Remove the circular reference to LambdaExpr in CXXRecordDecl."
      
      Revert "Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves."
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193226 91177308-0d34-0410-b5e6-96231b3b80d8
      80f2b2e6
    • Faisal Vali's avatar
      Remove the circular reference to LambdaExpr in CXXRecordDecl. · a4c91afe
      Faisal Vali authored
      Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl.
      
      No change in functionality. 
      
      In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. 
      
      This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): 
      http://llvm-reviews.chandlerc.com/D1856
      
      Thanks!
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193223 91177308-0d34-0410-b5e6-96231b3b80d8
      a4c91afe
    • Richard Smith's avatar
      Make UsingShadowDecls redeclarable. This fixes some visibility problems with · f06a2893
      Richard Smith authored
      modules.
      
      With this fixed, I no longer see any test regressions in the libc++ test suite
      when enabling a single-module module.map for libc++ (other than issues with my
      system headers).
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193219 91177308-0d34-0410-b5e6-96231b3b80d8
      f06a2893
    • Faisal Vali's avatar
      Again: Teach TreeTransform and family how to transform generic · b814a2ac
      Faisal Vali authored
      lambdas nested within templates and themselves.
      
      A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted,
      
      
      The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType.  This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off.
      Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476.
      
      The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created.   
      
      This does not yet include capturing.
      
      Please see test file for examples.
      
      This patch was LGTM'd by Doug:
      http://llvm-reviews.chandlerc.com/D1784
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193216 91177308-0d34-0410-b5e6-96231b3b80d8
      b814a2ac
    • Richard Smith's avatar
    • Jordan Rose's avatar
      CFG: Properly print delegating initializer CFG elements. · 3f5b4de5
      Jordan Rose authored
      ...rather than segfaulting.
      
      Patch by Enrico P!
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193208 91177308-0d34-0410-b5e6-96231b3b80d8
      3f5b4de5
    • Alp Toker's avatar
      Retain previous language linkage of friend function declarations · a8a2ebe9
      Alp Toker authored
      With this extension, friend function declarations will retain the language
      linkage specified for previous declarations instead of emitting an error
      diagnostic.
      
      The feature is known to be compatible with GCC and MSVC and permits a
      language to be specified indirectly where it cannot otherwise be written
      directly in class scope.
      
      Work is ongoing to improve linkage spec diagnostics.
      
      Fixes PR17337.
      
      Reviewed by Richard Smith.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193206 91177308-0d34-0410-b5e6-96231b3b80d8
      a8a2ebe9
    • Richard Smith's avatar
      Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted · 69170e6e
      Richard Smith authored
      check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end
      check which inserts traps).
      
      Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce
      useful diagnostics and has false positives (PR17635), and is not a good
      compromise position between UBSan's checks and ASan's checks.
      
      Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical
      behavior for that flag.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193205 91177308-0d34-0410-b5e6-96231b3b80d8
      69170e6e
  2. Oct 22, 2013
  3. Oct 21, 2013
Loading