[Lldb-commits] [PATCH] Fix type detection for 'char' when it is unsigned

Tamas Berghammer tberghammer at google.com
Thu Mar 26 10:10:42 PDT 2015


CharTy will be initialized to the right type (unsigned / signed char) based on LangOpts in ASTContext.{h/cpp}

The problem is that it isn't defined in the C++ spec what is the type of char. If we returning ClangASTType (ast, ast->UnsignedCharTy.getAsOpaquePtr()) then the user will see "unsigned char" as the displayed type when the actual type of the variable is "char" (causing several test failure and "char" and "unsigned char" are two fundamentally different type (they have the same representation but nothing else is common in them).

A very similar logic is also implemented in Line 956-969 for the case when char is signed.


http://reviews.llvm.org/D8636

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list