Skip to content
  1. Apr 24, 2011
    • Sebastian Redl's avatar
      Make the invalid declarator recovery when parsing members work the same as... · 83f3b859
      Sebastian Redl authored
      Make the invalid declarator recovery when parsing members work the same as when parsing global decls. It's still rather broken (skipping much too far when the declarator belongs to a function definition), but at least not so broken as to mismatch braces. Tested by the removal of the fixme in the template test case.
      
      llvm-svn: 130101
      83f3b859
    • Sebastian Redl's avatar
      Give MultiplexConsumer.h a header guard. · ddb3ab49
      Sebastian Redl authored
      llvm-svn: 130100
      ddb3ab49
    • Sebastian Redl's avatar
      Fix PathDiagnosticClients.h header guard. (Case error) · e2d93b15
      Sebastian Redl authored
      llvm-svn: 130099
      e2d93b15
    • Sebastian Redl's avatar
      Store the full list of pending instantiations in a chained PCH. Previously we... · 14afaf00
      Sebastian Redl authored
      Store the full list of pending instantiations in a chained PCH. Previously we attempted to store only new pending instantiations, but our filter was incorrect, dropping implicit instantiations of class template members. It's just not worth coming up with a complex filter that is correct, when the only cost is PCH files that are a few hundred bytes (at most) larger.
      
      llvm-svn: 130098
      14afaf00
    • Francois Pichet's avatar
      Downgrade unnecessary "typename" from error to warning in Microsoft mode. · dd876125
      Francois Pichet authored
      This fixes 1 error when parsing MSVC 2008 headers with clang. 
      
      Must "return true;" even if it is a warning because the rest of the code path assumes that SS is set to something. The parser will get back on its feet and continue parsing the rest of the declaration correctly so it is not a problem.
      
      llvm-svn: 130088
      dd876125
    • Ken Dyck's avatar
      Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality · 27337a88
      Ken Dyck authored
      intended.
      
      llvm-svn: 130087
      27337a88
    • Jay Foad's avatar
      PR9214: Convert the DIBuilder API to use ArrayRef. · dbf81d8d
      Jay Foad authored
      llvm-svn: 130086
      dbf81d8d
    • Ken Dyck's avatar
      Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change in · f76759c6
      Ken Dyck authored
      functionality intended.
      
      llvm-svn: 130085
      f76759c6
    • John McCall's avatar
      GCC seems to create address-of expression manglings when passing *any* · 617339e6
      John McCall authored
      function as a template argument where a pointer to function is wanted.
      Just extend the existing hack.
      
      llvm-svn: 130084
      617339e6
    • John McCall's avatar
      Update the mangler for some of the "new" unresolved-name manglings. · 6dc0a2b4
      John McCall authored
      I've sent off an email requesting clarification on a few things that
      I wasn't sure how to handle.
      
      This also necessitated making prefixes and unresolved-prefixes get
      mangled separately.
      
      llvm-svn: 130083
      6dc0a2b4
    • Douglas Gregor's avatar
      Implement a new identifier-classification scheme where Sema · 0e7dde53
      Douglas Gregor authored
      performs name lookup for an identifier and resolves it to a
      type/expression/template/etc. in the same step. This scheme is
      intended to improve both performance (by reducing the number of
      redundant name lookups for a given identifier token) and error
      recovery (by giving Sema a chance to correct type names before the
      parser has decided that the identifier isn't a type name). For
      example, this allows us to properly typo-correct type names at the
      beginning of a statement:
      
      t.c:6:3: error: use of undeclared identifier 'integer'; did you mean
      'Integer'?
        integer *i = 0;
        ^~~~~~~
        Integer
      t.c:1:13: note: 'Integer' declared here
      typedef int Integer;
                  ^
      
      
      Previously, we wouldn't give a Fix-It because the typo correction
      occurred after the parser had checked whether "integer" was a type
      name (via Sema::getTypeName(), which isn't allowed to typo-correct)
      and therefore decided to parse "integer * i = 0" as an expression. By
      typo-correcting earlier, we typo-correct to the type name Integer and
      parse this as a declaration. 
      
      Moreover, in this context, we can also typo-correct identifiers to
      keywords, e.g.,
      
      t.c:7:3: error: use of undeclared identifier 'vid'; did you mean
      'void'?
        vid *p = i;
        ^~~
        void
      
      and recover appropriately.
      
      Note that this is very much a work-in-progress. The new
      Sema::ClassifyName is only used for expression-or-declaration
      disambiguation in C at the statement level. The next steps will be to
      make this work for the same disambiguation in C++ (where
      functional-style casts make some trouble), then push it
      further into the parser to eliminate more redundant name lookups.
      
      Fixes <rdar://problem/7963833> for C and starts us down the path of
      <rdar://problem/8172000>.
      
      llvm-svn: 130082
      0e7dde53
    • John McCall's avatar
      The ABI settled on mangling float literals with lowercase hex dumps. · d8d1e2ae
      John McCall authored
      APInt::toString doesn't do those, but it's easy to postprocess that output,
      and that's probably better than adding another knob to that method.
      
      llvm-svn: 130081
      d8d1e2ae
    • Argyrios Kyrtzidis's avatar
      Put -Wunneeded-internal-declaration under UnusedFunction group so it will be... · 82270b46
      Argyrios Kyrtzidis authored
      Put -Wunneeded-internal-declaration under UnusedFunction group so it will be disabled with -Wno-unused-function.
      
      llvm-svn: 130080
      82270b46
    • Chandler Carruth's avatar
      Implement most of the remaining logic in __is_literal type trait. This · e71d0628
      Chandler Carruth authored
      should now support all of the C++98 types, and all of the C++0x types
      Clang supports.
      
      llvm-svn: 130079
      e71d0628
    • Chandler Carruth's avatar
      Add support for '__is_literal_type' spelling of the existing · 65fa1fd1
      Chandler Carruth authored
      '__is_literal' type trait for GCC compatibility. At least one relased
      version if libstdc++ uses this name for the trait despite it not being
      documented anywhere.
      
      llvm-svn: 130078
      65fa1fd1
    • Chandler Carruth's avatar
      Begin tracking trivialness of move constructors and move assignment · ad7d4047
      Chandler Carruth authored
      operators in C++ record declarations.
      
      This patch starts off by updating a bunch of the standard citations to
      refer to the draft 0x standard so that the semantics intended for move
      varianst is clear. Where necessary these are duplicated so they'll be
      available in doxygen.
      
      It adds bit fields to keep track of the state for the move constructs,
      and updates all the code necessary to track this state (I think) as
      members are declared for a class. It also wires the state into the
      various trait-like accessors in the AST's API, and tests that the type
      trait expressions now behave correctly in the presence of move
      constructors and move assignment operators.
      
      This isn't complete yet due to these glaring FIXMEs:
      1) No synthesis of implicit move constructors or assignment operators.
      2) I don't think we correctly enforce the new logic for both copy and
         move trivial checks: that the *selected* copy/move
         constructor/operator is trivial. Currently this requires *all* of them
         to be trivial.
      3) Some of the trait logic needs to be folded into the fine-grained
         trivial bits to more closely match the wording of the standard. For
         example, many of the places we currently set a bit to track POD-ness
         could be removed by querying other more fine grained traits on
         demand.
      
      llvm-svn: 130076
      ad7d4047
  2. Apr 23, 2011
Loading