]> granicus.if.org Git - clang/commit
Pretty Printer: Fix printing of conversion operator decls and calls.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 25 Feb 2014 17:26:26 +0000 (17:26 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 25 Feb 2014 17:26:26 +0000 (17:26 +0000)
commit8388f814fbb17a5b258f0d30b0c12e4c8d109480
tree91ca6710fc454de45470dab9f49ffa39f6763944
parente44e9e0a0039fb869c17a49208a3ec0c4f4a9d90
Pretty Printer: Fix printing of conversion operator decls and calls.

- Don't emit anything when we encounter a call to a conversion operator.
    "bar(a & b)" instead of "bar(a & b.operator int())"
  This preserves the semantics and is still idempotent if we print the AST multiple times.

- Properly print declarations of conversion operators.
    "explicit operator bool();" instead of "bool operator _Bool();"

PR18776.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202167 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/DeclPrinter.cpp
lib/AST/DeclarationName.cpp
lib/AST/StmtPrinter.cpp
test/SemaCXX/ast-print.cpp