Skip to content
Snippets Groups Projects
  1. Jan 24, 2013
    • Jordan Rose's avatar
      Handle universal character names and Unicode characters outside of literals. · c7629d94
      Jordan Rose authored
      This is a missing piece for C99 conformance.
      
      This patch handles UCNs by adding a '\\' case to LexTokenInternal and
      LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
      If the UCN is not syntactically well-formed, we fall back to the old
      treatment: a backslash followed by an identifier beginning with 'u' (or 'U').
      
      Because the spelling of an identifier with UCNs still has the UCN in it, we
      need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.
      
      Of course, valid code that does *not* use UCNs will see only a very minimal
      performance hit (checks after each identifier for non-ASCII characters,
      checks when converting raw_identifiers to identifiers that they do not
      contain UCNs, and checks when getting the spelling of an identifier that it
      does not contain a UCN).
      
      This patch also adds basic support for actual UTF-8 in the source. This is
      treated almost exactly the same as UCNs except that we consider stray
      Unicode characters to be mistakes and offer a fixit to remove them.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173369 91177308-0d34-0410-b5e6-96231b3b80d8
      c7629d94
  2. Jan 17, 2013
  3. Jan 16, 2013
  4. Jan 12, 2013
  5. Dec 12, 2012
  6. Dec 11, 2012
  7. Dec 04, 2012
  8. Nov 17, 2012
  9. Oct 24, 2012
  10. Oct 10, 2012
    • Douglas Gregor's avatar
      Rework the (de-)serialization of macros, as stored in · a8235d6c
      Douglas Gregor authored
      MacroInfo*. Instead of simply dumping an offset into the current file,
      give each macro definition a proper ID with all of the standard
      modules-remapping facilities. Additionally, when a macro is modified
      in a subsequent AST file (e.g., #undef'ing a macro loaded from another
      module or from a precompiled header), provide a macro update record
      rather than rewriting the entire macro definition. This gives us
      greater consistency with the way we handle declarations, and ties
      together macro definitions much more cleanly.
      
      Note that we're still not actually deserializing macro history (we
      never were), but it's far easy to do properly now.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165560 91177308-0d34-0410-b5e6-96231b3b80d8
      a8235d6c
  11. Sep 29, 2012
  12. Sep 24, 2012
  13. Aug 13, 2012
  14. Jun 29, 2012
  15. Jun 20, 2012
  16. Jun 19, 2012
    • Meador Inge's avatar
      Revert predefined decl tracking. · 9416d424
      Meador Inge authored
      r158085 added some logic to track predefined declarations.  The main reason we
      had predefined declarations in the input was because the __builtin_va_list
      declarations were injected into the preprocessor input.  As of r158592 we 
      explicitly build the __builtin_va_list declarations.  Therefore the predefined
      decl tracking is no longer needed.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158732 91177308-0d34-0410-b5e6-96231b3b80d8
      9416d424
  17. Jun 08, 2012
    • Jordan Rose's avatar
      Disable _Pragma during HTML macro rewriting to keep from crashing. · 6fe6a49c
      Jordan Rose authored
      The preprocessor's handling of diagnostic push/pops is stateful, so
      encountering pragmas during a re-parse causes problems. HTMLRewrite
      already filters out normal # directives including #pragma, so it's
      clear it's not expected to be interpreting pragmas in this mode.
      
      This fix adds a flag to Preprocessor to explicitly disable pragmas.
      The "right" fix might be to separate pragma lexing from pragma
      parsing so that we can throw away pragmas like we do preprocessor
      directives, but right now it's important to get the fix in.
      
      Note that this has nothing to do with the "hack" of re-using the
      input preprocessor in HTMLRewrite. Even if we someday copy the
      preprocessor instead of re-using it, the copy would (and should) include
      the diagnostic level tables and have the same problems.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158214 91177308-0d34-0410-b5e6-96231b3b80d8
      6fe6a49c
  18. Jun 06, 2012
  19. Jun 02, 2012
  20. Apr 03, 2012
  21. Mar 16, 2012
    • Axel Naumann's avatar
      From Vassil Vassilev: · e55329d6
      Axel Naumann authored
      Enable incremental parsing by the Preprocessor,
      where more code can be provided after an EOF.
      It mainly prevents the tearing down of the topmost lexer.
      To be used like this:
      PP.enableIncrementalProcessing();
      while (getMoreSource()) {
        while (Parser.ParseTopLevelDecl(ADecl)) {...}
      }
      PP.enableIncrementalProcessing(false);
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152914 91177308-0d34-0410-b5e6-96231b3b80d8
      e55329d6
  22. Mar 11, 2012
  23. Mar 05, 2012
  24. Mar 01, 2012
  25. Feb 25, 2012
  26. Feb 07, 2012
  27. Feb 05, 2012
  28. Feb 04, 2012
  29. Jan 30, 2012
  30. Jan 29, 2012
  31. Jan 05, 2012
  32. Jan 04, 2012
  33. Jan 03, 2012
    • Douglas Gregor's avatar
      Eliminate the uglified keyword __import_module__ for importing · c13a34b6
      Douglas Gregor authored
      modules. This leaves us without an explicit syntax for importing
      modules in C/C++, because such a syntax needs to be discussed
      first. In Objective-C/Objective-C++, the @import syntax is used to
      import modules.
      
      Note that, under -fmodules, C/C++ programs can import modules via the
      #include mechanism when a module map is in place for that header. This
      allows us to work with modules in C/C++ without committing to a syntax.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147467 91177308-0d34-0410-b5e6-96231b3b80d8
      c13a34b6
Loading