comparison tools/clang/docs/MSVCCompatibility.rst @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 60c9769439b8
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
82 GDB however sophisticated C++ expressions are likely to fail. 82 GDB however sophisticated C++ expressions are likely to fail.
83 83
84 * RTTI: :good:`Complete`. Generation of RTTI data structures has been 84 * RTTI: :good:`Complete`. Generation of RTTI data structures has been
85 finished, along with support for the ``/GR`` flag. 85 finished, along with support for the ``/GR`` flag.
86 86
87 * Exceptions and SEH: :partial:`Minimal`. Clang can parse both constructs, but 87 * Exceptions and SEH: :partial:`Partial`.
88 does not know how to emit compatible handlers. Clang cannot throw exceptions 88 C++ exceptions (``try`` / ``catch`` / ``throw``) and
89 but it can rethrow them. 89 structured exceptions (``__try`` / ``__except`` / ``__finally``) mostly
90 work on x64. 32-bit exception handling support is being worked on. LLVM does
91 not model asynchronous exceptions, so it is currently impossible to catch an
92 asynchronous exception generated in the same frame as the catching ``__try``.
93 C++ exception specifications are ignored, but this is `consistent with Visual
94 C++`_.
90 95
91 * Thread-safe initialization of local statics: :none:`Unstarted`. We are ABI 96 .. _consistent with Visual C++:
92 compatible with MSVC 2013, which does not support thread-safe local statics. 97 https://msdn.microsoft.com/en-us/library/wfa0edys.aspx
93 MSVC "14" changed the ABI to make initialization of local statics thread safe, 98
94 and we have not yet implemented this. 99 * Thread-safe initialization of local statics: :good:`Complete`. MSVC 2015
100 added support for thread-safe initialization of such variables by taking an
101 ABI break.
102 We are ABI compatible with both the MSVC 2013 and 2015 ABI for static local
103 variables.
95 104
96 * Lambdas: :good:`Mostly complete`. Clang is compatible with Microsoft's 105 * Lambdas: :good:`Mostly complete`. Clang is compatible with Microsoft's
97 implementation of lambdas except for providing overloads for conversion to 106 implementation of lambdas except for providing overloads for conversion to
98 function pointer for different calling conventions. However, Microsoft's 107 function pointer for different calling conventions. However, Microsoft's
99 extension is non-conforming. 108 extension is non-conforming.
110 an analysis of inline method bodies in class templates until instantiation 119 an analysis of inline method bodies in class templates until instantiation
111 time. By default on Windows, Clang attempts to follow suit. This behavior is 120 time. By default on Windows, Clang attempts to follow suit. This behavior is
112 controlled by the ``-fdelayed-template-parsing`` flag. While Clang delays 121 controlled by the ``-fdelayed-template-parsing`` flag. While Clang delays
113 parsing of method bodies, it still parses the bodies *before* template argument 122 parsing of method bodies, it still parses the bodies *before* template argument
114 substitution, which is not what MSVC does. The following compatibility tweaks 123 substitution, which is not what MSVC does. The following compatibility tweaks
115 are necessary to parse the the template in those cases. 124 are necessary to parse the template in those cases.
116 125
117 MSVC allows some name lookup into dependent base classes. Even on other 126 MSVC allows some name lookup into dependent base classes. Even on other
118 platforms, this has been a `frequently asked question`_ for Clang users. A 127 platforms, this has been a `frequently asked question`_ for Clang users. A
119 dependent base class is a base class that depends on the value of a template 128 dependent base class is a base class that depends on the value of a template
120 parameter. Clang cannot see any of the names inside dependent bases while it 129 parameter. Clang cannot see any of the names inside dependent bases while it