[PATCH] [MSVC] Improved __noop support (https://llvm.org/bugs/show_bug.cgi?id=14081)

Ilia ili.filippov at gmail.com
Mon Apr 13 04:56:15 PDT 2015


Hi rsmith, rnk,

__noop is declared with manually checked arguments ("t") that prevents any checking of argument completeness. __noop can be called with void arguments now.
It is declared that __noop has constant zero return value. So __noop can be assigned as a pointer now.
Special flag is added which indicates that parsing is inside __noop expression. Functions aren't marked as referenced if they are __noop parameters. This prevents from template instantiation of function that is used only in __noop expression.

This behavior is the same as MS compiler behavior.

http://reviews.llvm.org/D9000

Files:
  include/clang/Basic/Builtins.def
  include/clang/Sema/Sema.h
  lib/AST/ExprConstant.cpp
  lib/Parse/ParseExpr.cpp
  lib/Sema/Sema.cpp
  lib/Sema/SemaChecking.cpp
  lib/Sema/SemaExpr.cpp
  test/CodeGen/builtin-ms-noop.cpp
  test/Sema/builtin-ms-noop-errors.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9000.23672.patch
Type: text/x-patch
Size: 9323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150413/d3482695/attachment.bin>


More information about the cfe-commits mailing list